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: Auto-generate changelog (argoproj#5903)
Signed-off-by: Alex Collins <[email protected]>
- Loading branch information
Showing
7 changed files
with
11,182 additions
and
409 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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Changelog | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- dev-* | ||
# run every 30m to make sure it is up-to-date | ||
schedule: | ||
- cron: "*/30 * * * *" | ||
jobs: | ||
generate_changelog: | ||
runs-on: ubuntu-latest | ||
name: Generate changelog | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
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 | ||
- run: ./hack/changelog.sh > CHANGELOG.md | ||
- name: Commit files | ||
run: | | ||
git config --local user.email [email protected] | ||
git config --local user.name 'Changelog Github Actions' | ||
git add CHANGELOG.md && git commit -s -m 'docs: Updated CHANGELOG.md' && echo "push=true" >> $GITHUB_ENV || echo "No changes to CHANGELOG.md" | ||
- name: Push changes | ||
if: env.push == 'true' | ||
run: git push |
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
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 |
---|---|---|
|
@@ -9,7 +9,7 @@ cmd/**/debug | |
hack/**/debug | ||
/argo | ||
/argoexec | ||
changelog | ||
release-notes | ||
debug.test | ||
git-ask-pass.sh | ||
*.iml | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
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
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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/usr/bin/env sh | ||
set -eu | ||
|
||
echo '# Changelog' | ||
echo | ||
|
||
tag= | ||
git tag -l 'v*' | sort -rd | while read last; do | ||
if [ "$tag" != "" ]; then | ||
echo "## $tag ($(git log $tag -n1 --format=%as))" | ||
echo | ||
git --no-pager log --format=' * %h %s' $last..$tag | ||
echo | ||
echo "### Contributors" | ||
echo | ||
git --no-pager log --format=' * %an' $last..$tag | sort -u | ||
echo | ||
fi | ||
tag=$last | ||
done |
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