Skip to content

Commit ab323f5

Browse files
committed
GitHub Workflows: fix abi-stable.yaml for pull request
Signed-off-by: Martin Wilck <[email protected]>
1 parent 02797bb commit ab323f5

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

.github/workflows/abi-stable.yaml

+12-4
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,16 @@ on:
1515

1616
jobs:
1717
reference-abi:
18-
runs-on: ubuntu-20.04
18+
runs-on: ubuntu-22.04
1919
steps:
2020
- name: get parent tag
2121
run: >
2222
echo ${{ github.ref }} |
2323
sed -E 's,refs/heads/stable-([0-9]\.[0-9]*)\.y,PARENT_TAG=\1.0,' >> $GITHUB_ENV
24+
if: ${{ github.event_name == 'push' }}
25+
- name: get parent tag
26+
run: echo PARENT_TAG=${{ github.base_ref }} >> $GITHUB_ENV
27+
if: ${{ github.event_name == 'pull_request' }}
2428
- name: assert parent tag
2529
run: /bin/false
2630
if: ${{ env.PARENT_TAG == '' }}
@@ -45,20 +49,24 @@ jobs:
4549
path: abi
4650

4751
check-abi:
48-
runs-on: ubuntu-20.04
52+
runs-on: ubuntu-22.04
4953
needs: reference-abi
5054
steps:
5155
- name: get parent tag
5256
run: >
5357
echo ${{ github.ref }} |
5458
sed -E 's,refs/heads/stable-([0-9]\.[0-9]*)\.y,PARENT_TAG=\1.0,' >> $GITHUB_ENV
59+
if: ${{ github.event_name == 'push' }}
60+
- name: get parent tag
61+
run: echo PARENT_TAG=${{ github.base_ref }} >> $GITHUB_ENV
62+
if: ${{ github.event_name == 'pull_request' }}
5563
- name: assert parent tag
5664
run: /bin/false
5765
if: ${{ env.PARENT_TAG == '' }}
58-
- name: checkout ${{ env.PARENT_TAG }}
66+
- name: checkout ${{ github.base_ref }}
5967
uses: actions/checkout@v4
6068
with:
61-
ref: ${{ env.PARENT_TAG }}
69+
ref: ${{ github.base_ref }}
6270
- name: download ABI for ${{ env.PARENT_TAG }}
6371
id: download_abi
6472
uses: actions/download-artifact@v4

0 commit comments

Comments
 (0)