mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-27 15:16:43 +00:00
Update build-and-push.yml
14:17
This commit is contained in:
parent
d1ef1a9cb2
commit
1d4a2ed39b
1 changed files with 14 additions and 1 deletions
15
.github/workflows/build-and-push.yml
vendored
15
.github/workflows/build-and-push.yml
vendored
|
|
@ -15,10 +15,23 @@ jobs:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Fetch PR number
|
||||||
|
id: get-pr
|
||||||
|
run: |
|
||||||
|
PR_NUMBER=$(gh pr list --state merged --base main --json number --jq '.[0].number' || echo "")
|
||||||
|
echo "PR_NUMBER=${PR_NUMBER}" >> $GITHUB_ENV
|
||||||
|
env:
|
||||||
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Fail if no PR found
|
||||||
|
if: env.PR_NUMBER == ''
|
||||||
|
run: |
|
||||||
|
echo "No merged PR found. Exiting."
|
||||||
|
exit 1
|
||||||
|
|
||||||
- name: Fetch PR labels
|
- name: Fetch PR labels
|
||||||
id: get-labels
|
id: get-labels
|
||||||
run: |
|
run: |
|
||||||
PR_NUMBER=$(jq --raw-output .pull_request.number "$GITHUB_EVENT_PATH")
|
|
||||||
LABELS=$(gh pr view $PR_NUMBER --json labels --jq '.labels[].name' || echo "")
|
LABELS=$(gh pr view $PR_NUMBER --json labels --jq '.labels[].name' || echo "")
|
||||||
echo "PR_LABELS=${LABELS}" >> $GITHUB_ENV
|
echo "PR_LABELS=${LABELS}" >> $GITHUB_ENV
|
||||||
env:
|
env:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue