Skip to content

Commit

Permalink
ci: only run changelog job on tag (argoproj#6003)
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Collins <[email protected]>
  • Loading branch information
alexec committed May 25, 2021
1 parent d7c5cf6 commit 6cda063
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions .github/workflows/changelog.yaml
Original file line number Diff line number Diff line change
@@ -1,28 +1,25 @@
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
name: Generate changelog
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 }}
signoff: true

0 comments on commit 6cda063

Please sign in to comment.