Skip to content

Commit

Permalink
[contributors-action] altera secret
Browse files Browse the repository at this point in the history
  • Loading branch information
nkzren committed Oct 11, 2023
1 parent 16cd0c0 commit 0edf613
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion .github/actions/contributors-json/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,12 @@ const { HttpClient } = require('@actions/http-client');
const { URLSearchParams } = require('url');

const doGet = async (url) => {
const token = core.getInput("PRIVATE_TOKEN");
if (!token) {
console.warn("NO TOKEN CONFIGURED");
}
const headers = {
authorization: `Bearer ${core.getInput("PRIVATE_TOKEN")}`
authorization: `Bearer ${token}`
}
const client = new HttpClient('client', [], headers)
return (await client.getJson(url)).result;
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/contributors-json.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- run: yarn add @actions/core @actions/http-client
- uses: ./.github/actions/contributors-json
with:
PRIVATE_TOKEN: ${{ secrets.PRIVATE_TOKEN }}
PRIVATE_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/upload-artifact@v3
with:
name: contributors-json
Expand Down

0 comments on commit 0edf613

Please sign in to comment.