Skip to content

Commit

Permalink
GitHub Workflows: fix abi-stable.yaml for pull request
Browse files Browse the repository at this point in the history
Signed-off-by: Martin Wilck <mwilck@suse.com>
  • Loading branch information
mwilck committed Jan 24, 2025
1 parent 02797bb commit ab323f5
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions .github/workflows/abi-stable.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,16 @@ on:

jobs:
reference-abi:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- name: get parent tag
run: >
echo ${{ github.ref }} |
sed -E 's,refs/heads/stable-([0-9]\.[0-9]*)\.y,PARENT_TAG=\1.0,' >> $GITHUB_ENV
if: ${{ github.event_name == 'push' }}
- name: get parent tag
run: echo PARENT_TAG=${{ github.base_ref }} >> $GITHUB_ENV
if: ${{ github.event_name == 'pull_request' }}
- name: assert parent tag
run: /bin/false
if: ${{ env.PARENT_TAG == '' }}
Expand All @@ -45,20 +49,24 @@ jobs:
path: abi

check-abi:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
needs: reference-abi
steps:
- name: get parent tag
run: >
echo ${{ github.ref }} |
sed -E 's,refs/heads/stable-([0-9]\.[0-9]*)\.y,PARENT_TAG=\1.0,' >> $GITHUB_ENV
if: ${{ github.event_name == 'push' }}
- name: get parent tag
run: echo PARENT_TAG=${{ github.base_ref }} >> $GITHUB_ENV
if: ${{ github.event_name == 'pull_request' }}
- name: assert parent tag
run: /bin/false
if: ${{ env.PARENT_TAG == '' }}
- name: checkout ${{ env.PARENT_TAG }}
- name: checkout ${{ github.base_ref }}
uses: actions/checkout@v4
with:
ref: ${{ env.PARENT_TAG }}
ref: ${{ github.base_ref }}
- name: download ABI for ${{ env.PARENT_TAG }}
id: download_abi
uses: actions/download-artifact@v4
Expand Down

0 comments on commit ab323f5

Please sign in to comment.