Update base images #375
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 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: azimuth-cloud/github-actions/generate-app-token@master | |
id: generate-app-token | |
with: | |
repository: ${{ github.repository }} | |
app-id: ${{ secrets.AUTOMATION_APP_ID }} | |
app-private-key: ${{ secrets.AUTOMATION_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 |