From 6cda063aca83610f11d28252e928f730694bf218 Mon Sep 17 00:00:00 2001 From: Alex Collins Date: Tue, 25 May 2021 08:38:42 -0700 Subject: [PATCH] ci: only run changelog job on tag (#6003) Signed-off-by: Alex Collins --- .github/workflows/changelog.yaml | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/.github/workflows/changelog.yaml b/.github/workflows/changelog.yaml index 1097f005504d..1c3f62f9aca7 100644 --- a/.github/workflows/changelog.yaml +++ b/.github/workflows/changelog.yaml @@ -1,10 +1,10 @@ name: Changelog on: - # we not need or want to run on on pull request or branch changes, we just need to run periodically - # run every hour to make sure it is up-to-date - schedule: - - cron: "0 * * * *" + push: + tags: + - v* + - "!v0.0.0" jobs: generate_changelog: runs-on: ubuntu-latest @@ -12,17 +12,14 @@ jobs: steps: - uses: actions/checkout@v2 with: + ref: master fetch-depth: 0 - run: git fetch --prune --prune-tags - run: git tag -l 'v*' - # avoid invoking `make` to reduce the change of Makefile problem failing this workflow + # avoid invoking `make` to reduce the risk of a Makefile bug failing this workflow - run: ./hack/changelog.sh > CHANGELOG.md - uses: peter-evans/create-pull-request@v3 with: title: 'docs: updated CHANGELOG.md' commit-message: 'docs: updated CHANGELOG.md' - signoff: true - env: - # we need to use a token, otherwise the required build jobs will not run - # https://github.com/peter-evans/create-pull-request/issues/48 - GITHUB_TOKEN: ${{ secrets.CREATE_PULL_REQUEST_TOKEN }} \ No newline at end of file + signoff: true \ No newline at end of file