Update Changelog #164
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
name: Update Changelog | |
on: | |
workflow_dispatch: | |
schedule: | |
# every Monday morning | |
- cron: '0 2 * * 1' | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
update-dependencies: | |
strategy: | |
fail-fast: false | |
runs-on: 'ubuntu-latest' | |
name: Update Changelog | |
steps: | |
- name: Checkout ${{ github.sha }} | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Update changelog | |
run: | | |
UPDATES=$(git log --after=$(date -d '7 days ago' +%Y-%m-%dT%00:00:00) --pretty=format:%s) | |
PRE_PROCESSED=$(printf '%s\n' "$UPDATES" | sed 's/\\/&&/g;s/^[[:blank:]]/\\&/;s/$/\\/') | |
sed -i "/^## \[Unreleased\]/a\\$PRE_PROCESSED" CHANGELOG.md | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v3 | |
with: | |
token: ${{ secrets.OSC_ROBOT_GH_PUB_REPO_TOKEN }} | |
commit-message: update changelog | |
committer: OSC ROBOT <[email protected]> | |
author: osc-bot <[email protected]> | |
delete-branch: true | |
title: 'Update Changelog' | |
push-to-fork: osc-bot/ondemand | |
branch: osc-bot/changelog-update | |
body: | | |
Changelog updates from the last 7 days | |