diff --git a/.github/workflows/preview-build.yml b/.github/workflows/preview-build.yml index 12ae549fa4b..1c0c251fd90 100644 --- a/.github/workflows/preview-build.yml +++ b/.github/workflows/preview-build.yml @@ -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 @@ -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 diff --git a/.github/workflows/preview.yml b/.github/workflows/preview.yml index 9dd4f85fbd0..0d982e2e351 100644 --- a/.github/workflows/preview.yml +++ b/.github/workflows/preview.yml @@ -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 }}