-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #60 from camptocamp/update-changelog-generation
Update the changelog generation workflow
- Loading branch information
Showing
1 changed file
with
29 additions
and
13 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 |
---|---|---|
|
@@ -11,33 +11,49 @@ jobs: | |
changelog: | ||
name: Changelog Generator | ||
runs-on: ubuntu-20.04 | ||
timeout-minutes: 5 | ||
timeout-minutes: 10 | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- run: echo "${HOME}/.local/bin" >> ${GITHUB_PATH} | ||
- run: python3 -m pip install --user --requirement=ci/requirements.txt | ||
|
||
- name: Get Date | ||
id: get-date | ||
run: | | ||
echo "::set-output name=date::$(/bin/date -u "+%Y%m%d%H%M%S")" | ||
- uses: actions/cache@v3 | ||
with: | ||
path: | | ||
.github/changelog-generator-cache | ||
key: changelog-${{ steps.get-date.outputs.date }} | ||
restore-keys: | | ||
changelog- | ||
- name: Get config | ||
id: config | ||
run: echo ::set-output name=config::$(python -c 'print(__import__("json").dumps(__import__("yaml").load(open(".github/changelog-config.yaml"))))') | ||
|
||
- name: Generate changelog | ||
id: changelog | ||
uses: heinrichreimer/[email protected] | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
token: ${{ secrets.GOPASS_CI_GITHUB_TOKEN }} | ||
configureSections: ${{ steps.config.outputs.config }} | ||
cacheFile: github-changelog-generator-action.cache | ||
cacheFile: .github/changelog-generator-cache | ||
unreleased: false | ||
|
||
- run: c2cciutils-checks --fix --check=prettier | ||
- run: git add CHANGELOG.md | ||
- run: git config --global user.email "[email protected]" | ||
- run: git config --global user.name "CI" | ||
- run: git commit -m "Update the changelog" | ||
- run: git checkout -b changelog-update | ||
- run: git push origin changelog-update -f | ||
- run: gh pr create --base=master --fill --label=chore || true | ||
- id: status | ||
run: echo ::set-output name=status::$(git status --short) | ||
- run: | | ||
c2cciutils-checks --fix --check=prettier | ||
git add CHANGELOG.md | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "CI" | ||
git commit -m "Update the changelog" | ||
git checkout -b changelog-update | ||
git push origin changelog-update -f | ||
gh pr create --base=master --fill --label=chore || true | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
GITHUB_TOKEN: ${{ secrets.GOPASS_CI_GITHUB_TOKEN }} | ||
if: steps.status.outputs.status != '' |