Skip to content

Commit

Permalink
Checkout the baseline branch
Browse files Browse the repository at this point in the history
  • Loading branch information
aborgna-q committed Oct 18, 2024
1 parent 56c47a3 commit fa610bf
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/rs-semver-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_PAT }}
steps:
- uses: actions/checkout@v4
with:
path: PR_BRANCH
- name: Checkout baseline
uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.baseline-rev || github.event.pull_request.base.sha || github.event.merge_group.base.sha }}
path: BASELINE_BRANCH
- uses: mozilla-actions/[email protected]
- name: Install stable toolchain
uses: dtolnay/rust-toolchain@stable
Expand All @@ -36,7 +43,8 @@ jobs:
- name: Check for public API changes
id: check-changes
run: |
cargo semver-checks --baseline-rev $BASELINE_REV > diagnostic.txt
cd PR_BRANCH
cargo semver-checks --baseline-root ../BASELINE_BRANCH > diagnostic.txt
if [ "$?" -ne 0 ] then
echo "breaking=true" >> $GITHUB_OUTPUT
else
Expand All @@ -49,8 +57,6 @@ jobs:
echo
echo EOF
} >> $GITHUB_OUTPUT
env:
BASELINE_REV: ${{ github.event.inputs.baseline-rev || github.event.pull_request.base.sha || github.event.merge_group.base.sha }}
# Check if the PR title contains a breaking change flag,
# to change the feedback message.
Expand Down

0 comments on commit fa610bf

Please sign in to comment.