-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (42 loc) · 1.48 KB
/
update-baseimage.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
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