0
0
mirror of https://github.com/bpg/terraform-provider-proxmox.git synced 2025-07-09 15:25:01 +00:00

add changelog generator

This commit is contained in:
Pavel Boldyrev 2021-09-08 21:57:39 -04:00
parent 968f775cf6
commit 875b2e828a
No known key found for this signature in database
GPG Key ID: 9A3B05A2B8921AD9
2 changed files with 28 additions and 4 deletions

View File

@ -0,0 +1,28 @@
name: Generate CHANGELOG
on:
pull_request:
types: [closed]
workflow_dispatch:
jobs:
GenerateChangelog:
if: github.event.pull_request.merged || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- run: cd tools && go install github.com/hashicorp/go-changelog/cmd/changelog-build
- run: ./scripts/generate-changelog.sh
- run: |
if [[ `git status --porcelain` ]]; then
if ${{github.event_name == 'workflow_dispatch'}}; then
MSG="Update CHANGELOG.md (Manual Trigger)"
else
MSG="Update CHANGELOG.md for #${{ github.event.pull_request.number }}"
fi
git config --local user.email changelogbot@hashicorp.com
git config --local user.name changelogbot
git add CHANGELOG.md
git commit -m "$MSG"
git push
fi

View File

@ -1,7 +1,3 @@
# This GitHub action runs your tests for each commit push and/or PR. Optionally
# you can turn it on using a cron schedule for regular testing.
#
name: Tests
on:
pull_request: