Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions .github/workflows/generate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,17 +57,24 @@ jobs:
echo "run_id=$ID" >> $GITHUB_OUTPUT

- name: Download metadata artifact
if: ${{ github.event_name == 'pull_request' }}
if: ${{ github.event_name == 'pull_request' && steps.main.outputs.run_id }}
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
with:
name: commit
run-id: ${{ steps.main.outputs.run_id }}
github-token: ${{ secrets.GITHUB_TOKEN }}

# A PR whose base has no `main` run, such as one stacked on another PR's
# branch, has nothing to compare against: it builds from the latest SHA
# from nodejs/node, and `generate` skips the comparison
- id: pr
if: ${{ github.event_name == 'pull_request' }}
run: |
SHA=$(cat commit)
if [ -f commit ]; then
SHA=$(cat commit)
else
SHA=$(git ls-remote https://github.com/nodejs/node.git HEAD | awk '{print $1}')
fi
echo "sha=$SHA" >> "$GITHUB_OUTPUT"

generate:
Expand Down
Loading