BaseImage Updater #97
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: BaseImage Updater | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 4 * * 0' | |
jobs: | |
auto-update-baseimage: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- run: rm -rf .git/hooks | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 16 | |
- run: npm install js-yaml | |
- name: Check for BaseImage Update | |
id: update_prep | |
uses: actions/github-script@v7.0.1 | |
with: | |
script: | | |
const script = require('./.github/workflows/update-baseimage/update-baseimage.js') | |
return await script({github, context, core}) | |
- uses: tibdex/github-app-token@v2 | |
id: get_bot_token | |
if: ${{ env.UPDATE_REQUIRED == 'true' }} | |
with: | |
app_id: ${{ secrets.BOT_APP_ID }} | |
private_key: ${{ secrets.BOT_PRIVATE_KEY }} | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v6 | |
if: ${{ env.UPDATE_REQUIRED == 'true' }} | |
with: | |
token: ${{ steps.get_bot_token.outputs.token }} | |
branch: update/overdrive-autoupdate | |
title: Auto-update BaseImage to ${{ env.EXT_RELEASE_TAG }} | |
commit-message: Auto-update BaseImage to ${{ env.EXT_RELEASE_TAG }} | |
body: | | |
Update the version of the BaseImage to the latest version (${{ env.EXT_RELEASE_TAG }}). | |
BaseImage Details: ${{ env.EXT_RELEASE_URL }} | |
--- | |
${{ env.EXT_RELEASE_BODY }} | |
labels: dependencies |