Skip to content

Commit

Permalink
chore(ci): Run the changelog check on the merge queue to pass require…
Browse files Browse the repository at this point in the history
…d checks

Signed-off-by: Jesse Szwedko <[email protected]>
  • Loading branch information
jszwedko committed Jan 23, 2024
1 parent 53f97c1 commit 841dcad
Showing 1 changed file with 24 additions and 2 deletions.
26 changes: 24 additions & 2 deletions .github/workflows/changelog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,23 @@
# - opened/re-opened
# - new commits pushed
# - label is added or removed
# Runs on MQs, but just passes, because it is a required check.

Check failure

Code scanning / check-spelling

Unrecognized Spelling Error

MQs is not a recognized word. (unrecognized-spelling)

name: Changelog

on:
pull_request:
types: [opened, synchronize, reopened, labeled, unlabeled]
# Due to MQ requiring same status checks as PRs, must pass by default in MQ
merge_group:
types: [checks_requested]

jobs:
check-changelog:
validate-changelog:
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
env:
PR_HAS_LABEL: ${{ contains( github.event.pull_request.labels.*.name, 'no-changelog') }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

Expand Down Expand Up @@ -60,3 +65,20 @@ jobs:
fi
./scripts/check_changelog_fragments.sh ${args}
check-changelog:
name: Changelog
runs-on: ubuntu-latest
needs: validate-changelog
if: always()
env:
FAILED: ${{ contains(needs.*.result, 'failure') }}
steps:
- name: exit
run: |
echo "failed=${{ env.FAILED }}"
if [[ "$FAILED" == "true" ]] ; then
exit 1
else
exit 0
fi

0 comments on commit 841dcad

Please sign in to comment.