diff --git a/.github/workflows/changelog.yaml b/.github/workflows/changelog.yaml index 353a2e5850fe5..da33fd4c94f2a 100644 --- a/.github/workflows/changelog.yaml +++ b/.github/workflows/changelog.yaml @@ -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. 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 @@ -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