Merge pull request #1526 from prometheus/changelog-automation

ci: Group all changelog-related CI jobs into single one
This commit is contained in:
Arthur Silva Sens 2024-06-03 10:44:29 -03:00 committed by GitHub
commit 8491260a42
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 7 additions and 14 deletions

View File

@ -1,5 +1,5 @@
--- ---
name: PR-auto-labeler name: Changelog automation
on: on:
pull_request_target: pull_request_target:
@ -12,11 +12,12 @@ permissions:
checks: write # to generate status checks: write # to generate status
jobs: jobs:
remove-old-labels: changelog-automation:
name: Remove old PR labels name: Changelog automation
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: mondeja/remove-labels-gh-action@v2.0.0 - name: Remove old PR labels
uses: mondeja/remove-labels-gh-action@v2.0.0
with: with:
token: ${{ secrets.GITHUB_TOKEN }} token: ${{ secrets.GITHUB_TOKEN }}
labels: | labels: |
@ -25,21 +26,13 @@ jobs:
kind/FEATURE kind/FEATURE
kind/CHANGE kind/CHANGE
release-note-none release-note-none
pr-labeler: - name: Add label to PR
runs-on: ubuntu-latest
needs: remove-old-labels
steps:
- name: Check Labels
id: labeler id: labeler
uses: jimschubert/labeler-action@v1 uses: jimschubert/labeler-action@v1
with: with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Adjust the configuration in /.github/labeler.yml # Adjust the configuration in /.github/labeler.yml
validate-pr-label:
runs-on: ubuntu-latest
needs: pr-labeler
steps:
- name: Verify Label - name: Verify Label
id: preview_label_check id: preview_label_check
uses: docker://agilepathway/pull-request-label-checker:latest uses: docker://agilepathway/pull-request-label-checker:latest
@ -52,7 +45,7 @@ jobs:
if: steps.preview_label_check.outputs.label_check == 'failure' if: steps.preview_label_check.outputs.label_check == 'failure'
with: with:
message: | message: |
PR body does not contain a valid type of change. Please refer to [CONTRIBUTING.md](https://github.com/prometheus/client_golang/blob/main/CONTRIBUTING.md#how-to-fill-the-pr-template) for more information. PR body does not contain a valid type of change. Please refer to [CONTRIBUTING.md](https://github.com/prometheus/client_golang/blob/main/CONTRIBUTING.md#how-to-write-a-pr-description) for more information.
comment_tag: labelfailure comment_tag: labelfailure
mode: recreate mode: recreate
- name: Remove Label Check Failure Comment - name: Remove Label Check Failure Comment