Skip to content

Update Changelog

Update Changelog #144

Workflow file for this run

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 <osc.robot@gmail.com>
author: osc-bot <osc.robot@gmail.com>
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