Skip to content

Commit

Permalink
chore : using github-app authentication [link.yml] (#750)
Browse files Browse the repository at this point in the history
  • Loading branch information
aialok authored Jun 12, 2024
1 parent fd1b085 commit ee124c7
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/links.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@ jobs:
with:
node-version: '20'

- name: Get Token
uses: actions/create-github-app-token@v1
id: get_workflow_token
with:
app-id: ${{ vars.APP_ID }}
private-key: ${{ secrets.PRIVATE_KEY }}

- name: Install Dependencies
run: yarn install --frozen-lockfile

Expand All @@ -44,7 +51,7 @@ jobs:
uses: lycheeverse/lychee-action@v1
with:
args: --base http://localhost:3000 --verbose --no-progress --accept 200,204,429,403 './pages/**/*.md' --cache --max-cache-age 1d http://localhost:3000
token: ${{secrets.AUTH_TOKEN}}
token: ${{secrets.GITHUB_TOKEN}}

- name: Install Octokit
run: yarn add @octokit/[email protected]
Expand All @@ -55,7 +62,7 @@ jobs:
if: env.lychee_exit_code != 0
uses: actions/github-script@v7
env:
AUTH_TOKEN: ${{secrets.AUTH_TOKEN}}
AUTH_TOKEN: ${{ steps.get_workflow_token.outputs.token }}
with:
script: |
const { Octokit } = require("@octokit/core");
Expand Down

0 comments on commit ee124c7

Please sign in to comment.