π Update blueprints #8496
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 blueprints | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 */3 * * *" | |
jobs: | |
bump_blueprints: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install ops2deb | |
uses: upciti/wakemeops-action@v1 | |
with: | |
packages: ops2deb | |
- name: Bump blueprints | |
env: | |
OPS2DEB_GITHUB_TOKEN: ${{ secrets.OPS2DEB_GITHUB_TOKEN }} | |
run: make update | |
- name: Build commit content | |
id: get-commit-content | |
shell: bash | |
run: | | |
changes="$(cat ops2deb-summary.log)" | |
if [[ $(echo "$changes" | wc -l) -gt 1 ]]; then | |
title="chore(bot): update blueprints" | |
body="$changes" | |
else | |
title="chore(bot): $(echo "$changes" | tr '[:upper:]' '[:lower:]')" | |
body= | |
fi | |
echo "title=$title" >> $GITHUB_OUTPUT | |
echo -e "body<<EOF\n$body\nEOF" >> $GITHUB_OUTPUT | |
- name: Create pull request | |
id: cpr | |
uses: peter-evans/create-pull-request@v7 | |
with: | |
token: ${{ secrets.WAKEMEBOT_GITHUB_ACCESS_TOKEN }} | |
commit-message: | | |
${{ steps.get-commit-content.outputs.title }} | |
${{ steps.get-commit-content.outputs.body }} | |
committer: wakemebot <[email protected]> | |
author: wakemebot <[email protected]> | |
branch: chore/update-blueprints | |
delete-branch: true | |
title: ${{ steps.get-commit-content.outputs.title }} | |
body: ${{ steps.get-commit-content.outputs.body }} | |
- name: Enable pull request automerge | |
if: steps.cpr.outputs.pull-request-operation == 'created' | |
uses: peter-evans/enable-pull-request-automerge@v3 | |
with: | |
token: ${{ secrets.WAKEMEBOT_GITHUB_ACCESS_TOKEN }} | |
pull-request-number: ${{ steps.cpr.outputs.pull-request-number }} | |
merge-method: rebase |