-
Notifications
You must be signed in to change notification settings - Fork 5
46 lines (41 loc) · 1.38 KB
/
base_image_update.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
name: Update base images
on:
# Allow manual executions
workflow_dispatch:
# Run nightly
schedule:
- cron: '0 0 * * *'
jobs:
propose_base_image_update:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
distro: [jammy]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install script dependencies
run: pip install -r ./requirements.txt
- name: Check for base image updates
id: base-image-update
run: ./bin/base-image-update ${{ matrix.distro }}
- name: Generate app token for PR
uses: stackhpc/github-actions/generate-app-token@master
id: generate-app-token
with:
repository: ${{ github.repository }}
app-id: ${{ secrets.APP_ID }}
app-private-key: ${{ secrets.APP_PRIVATE_KEY }}
- name: Propose changes via PR if required
uses: peter-evans/create-pull-request@v6
with:
token: ${{ steps.generate-app-token.outputs.token }}
commit-message: ${{ fromJson(steps.base-image-update.outputs.pr).title }}
branch: update/ubuntu-${{ matrix.distro }}
delete-branch: true
title: ${{ fromJson(steps.base-image-update.outputs.pr).title }}
body: ${{ fromJson(steps.base-image-update.outputs.pr).body }}
labels: |
automation
dependency-update