Repository navigation
chore(deps): update module github.com/go-jose/go-jose/v4 to v4.1.6 [security] (main) #47
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Changelog Check | |
| on: | |
| pull_request: | |
| types: [opened, synchronize, labeled, unlabeled] | |
| permissions: | |
| contents: read # actions/checkout | |
| pull-requests: read # `gh pr view --json labels` in the check-label step | |
| jobs: | |
| check-changelog: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7 | |
| with: | |
| persist-credentials: false | |
| - name: Check if changelog should be skipped | |
| id: check-label | |
| run: | | |
| # Renovate's labels vary by update type (e.g. update-patch, severity:*) and don't always | |
| # include dependency-update, so the label check below can't be relied on for its PRs. | |
| if [ "$PR_AUTHOR" = 'renovate-sh-app[bot]' ]; then | |
| echo "skip=true" >> $GITHUB_OUTPUT | |
| echo "PR is authored by $PR_AUTHOR, skipping changelog check" | |
| exit 0 | |
| fi | |
| LABELS=$(gh pr view ${{ github.event.pull_request.number }} --json labels --jq '.labels[].name') | |
| if echo "$LABELS" | grep -qE '^(changelog-not-needed|dependency-update|vendored-mimir-prometheus-update|helm-weekly-release|backport)$'; then | |
| echo "skip=true" >> $GITHUB_OUTPUT | |
| echo "PR has a label that skips changelog check, skipping changelog check" | |
| else | |
| echo "skip=false" >> $GITHUB_OUTPUT | |
| echo "PR does not have any labels that skip changelog check, will check changelog" | |
| fi | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| PR_AUTHOR: ${{ github.event.pull_request.user.login }} | |
| - name: Check PR reference in CHANGELOG.md | |
| if: steps.check-label.outputs.skip == 'false' | |
| run: | | |
| PR_NUMBER=${{ github.event.pull_request.number }} | |
| MAIN_CHANGELOG_FOUND=false | |
| HELM_CHANGELOG_FOUND=false | |
| if grep -q "#${PR_NUMBER}" CHANGELOG.md; then | |
| echo "✅ PR #${PR_NUMBER} is referenced in CHANGELOG.md" | |
| MAIN_CHANGELOG_FOUND=true | |
| fi | |
| if grep -q "#${PR_NUMBER}" operations/helm/charts/mimir-distributed/CHANGELOG.md; then | |
| echo "✅ PR #${PR_NUMBER} is referenced in helm CHANGELOG.md" | |
| HELM_CHANGELOG_FOUND=true | |
| fi | |
| if [ "$MAIN_CHANGELOG_FOUND" = true ] || [ "$HELM_CHANGELOG_FOUND" = true ]; then | |
| echo "✅ PR #${PR_NUMBER} is referenced in at least one changelog" | |
| else | |
| echo "❌ PR #${PR_NUMBER} is not referenced in CHANGELOG.md or operations/helm/charts/mimir-distributed/CHANGELOG.md" | |
| echo "Please add an entry for this PR in the appropriate changelog or add one of these labels if this change doesn't require a changelog entry: 'changelog-not-needed', 'dependency-update', 'vendored-mimir-prometheus-update', 'helm-weekly-release'" | |
| exit 1 | |
| fi |