Skip to content

Commit

Permalink
move creds in jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
louis-bompart committed May 31, 2024
1 parent fa743c5 commit f842e8e
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions .github/workflows/prbot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,11 @@ on:
env:
CYPRESS_VERIFY_TIMEOUT: 60000
jobs:
github_auth:
environment: PR Artifacts
runs-on: ubuntu-latest
outputs:
token: ${{ steps.generate-token.outputs.token }}
steps:
- name: Generate a token
id: generate-token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ secrets.GH_APP_ID }}
private-key: ${{ secrets.GH_APP_PRIVATE_KEY }}
report-size:
if: github.event_name == 'pull_request'
needs: github_auth
name: 'Report bundle size'
runs-on: ubuntu-latest
env:
GITHUB_CREDENTIALS: ${{ needs.github_auth.outputs.token }}
NODE_OPTIONS: --max_old_space_size=4096
steps:
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
Expand All @@ -33,7 +19,15 @@ jobs:
with:
node-version-file: '.nvmrc'
- run: npm ci
- name: Generate a token
id: generate-token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ secrets.GH_APP_ID }}
private-key: ${{ secrets.GH_APP_PRIVATE_KEY }}
- run: npm run pr:report
env:
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}
build:
name: 'Build'
needs: github_auth
Expand Down Expand Up @@ -80,10 +74,16 @@ jobs:
- run: npm run build
- run: cat packages/atomic/dist/atomic/atomic.esm.js
- uses: ./.github/actions/playwright-atomic
- name: Generate a token
id: generate-token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ secrets.GH_APP_ID }}
private-key: ${{ secrets.GH_APP_PRIVATE_KEY }}
- uses: ./.github/actions/publish-pr-review-site
if: ${{ always() && github.event_name == 'pull_request'}}
with:
token: ${{ needs.github_auth.outputs.token }}
token: ${{ steps.generate-token.outputs.token }}
copy: true
e2e-atomic-test:
name: 'Run e2e tests on Atomic'
Expand Down

0 comments on commit f842e8e

Please sign in to comment.