Skip to content

Commit

Permalink
build: Add workflow for auto upgrading the makesystem.
Browse files Browse the repository at this point in the history
  • Loading branch information
Tuxdude committed Feb 27, 2022
1 parent b928d5a commit bd1a229
Showing 1 changed file with 59 additions and 0 deletions.
59 changes: 59 additions & 0 deletions .github/workflows/upgrade-makesystem.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
---
name: Upgrade Makesystem

on:
schedule:
- cron: '0 */3 * * *'
workflow_dispatch:

permissions:
contents: write
pull-requests: write

jobs:
upgrade-makesystem:
name: Upgrade Makesystem
runs-on: ubuntu-latest

strategy:
fail-fast: false

steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Fetch full annotated tags metadata
run: git fetch --force --tags

- name: Set up makesystem
run: make makesystem_install

- name: Upgrade makesystem locally
run: make makesystem_upgrade

- name: Dump makesystem version
id: dump-makesystem-version
run: make github_dump_makesystem_version

- uses: tibdex/github-app-token@v1
id: generate-token
with:
app_id: ${{ secrets.UPGRADE_MAKESYSTEM_BOT_APP_ID }}
private_key: ${{ secrets.UPGRADE_MAKESYSTEM_BOT_APP_PRIVATE_KEY }}

- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
with:
token: ${{ steps.generate-token.outputs.token }}
commit-message: |
build: [upgrade-makesystem-bot] Upgrade to v${{ steps.dump-makesystem-version.outputs.version }}.
Automated change generated by the Upgrade Makesystem Bot.
branch: upgrade-makesystem-bot/patch
delete-branch: true
title: |
Upgrade the makesystem to v${{ steps.dump-makesystem-version.outputs.version }}
body: |
Automated change generated by the Upgrade Makesystem Bot.

0 comments on commit bd1a229

Please sign in to comment.