Skip to content

Commit

Permalink
Meta: fix passing PR number (see #2260)
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Jun 29, 2021
1 parent 80efe41 commit 1320e04
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/preview-build.yml
Expand Up @@ -7,9 +7,6 @@ jobs:
build:
name: 'build PR preview'
runs-on: ubuntu-latest
outputs:
sha: ${{ github.event.pull_request.head.sha }}
pr: ${{ github.event.number }}

steps:
- uses: actions/checkout@v2
Expand All @@ -20,6 +17,7 @@ jobs:
use-npm-ci: true
- run: npm run build-only
- run: node scripts/insert_snapshot_warning
- run: echo ${{ github.event.number }} > out/pr.txt
- uses: actions/upload-artifact@v2
with:
name: out
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/preview.yml
Expand Up @@ -49,8 +49,9 @@ jobs:
with:
script: |
console.log(${{ toJson(github.event) }});
- run: cat out/pr.txt >> $PULL_REQUEST
- run: rm out/pr.txt && echo $PULL_REQUEST
- run: node scripts/publish-preview
env:
CI_PREVIEW_TOKEN: ${{ secrets.CI_PREVIEW_TOKEN }}
PULL_REQUEST: ${{ github.event.workflow_run.pull_requests['0'].number }}
GITHUB_HEAD_SHA: ${{ github.event.workflow_run.head_commit.id }}

0 comments on commit 1320e04

Please sign in to comment.