Skip to content

Update Collected Notes #3

Update Collected Notes

Update Collected Notes #3

name: Update Collected Notes
on: # yamllint disable-line rule:truthy
workflow_dispatch:
jobs:
update-collected-notes:
name: "update collected notes"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Add brew to PATH # https://github.com/actions/runner-images/issues/6283
if: runner.os == 'Linux'
run: echo "/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin" >> $GITHUB_PATH
- name: Install just
run: brew install just
- name: Retrieve Collected Notes
run: just script-retrieve-collected-notes
- name: Commit and open PR
# Use github CLI
run: |
git config --global user.email "[email protected]"
git config --global user.name "Github Actions Bot"
export DATE=$(date +%Y-%m-%d)
export BRANCH_NAME=$DATE-update-collected-notes
git switch --create $BRANCH_NAME
git add .
git commit -m "collected-notes: update to latest $DATE"
git push origin $BRANCH_NAME
gh pr create --title "Update Collected Notes $DATE" --body "Please review the changes\n\nAuto generated by $GITHUB_ACTION at $GITHUB_ACTION_PATH" --base main --head $BRANCH_NAME