forked from argoproj/argo-workflows
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: only run changelog job on tag (argoproj#6003)
Signed-off-by: Alex Collins <[email protected]>
- Loading branch information
Showing
1 changed file
with
7 additions
and
10 deletions.
There are no files selected for viewing
This file contains 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
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 |