Base image auto update #468
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: Base image auto update | |
on: | |
schedule: | |
- cron: "5 0 * * *" | |
workflow_dispatch: | |
jobs: | |
build: | |
if: github.repository == 'RedHatInsights/notifications-backend' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up skopeo | |
run: sudo apt-get install -y skopeo | |
- name: Check change | |
run: skopeo inspect docker://registry.access.redhat.com/ubi8/openjdk-21-runtime:latest | jq .Digest --raw-output > .baseimage | |
- name: Do change if the digest changed | |
run: | | |
git config user.name 'Update-a-Bot' | |
git config user.email 'notifications-team@redhat.com' | |
git add -A | |
git commit -m "Update ubi8/openjdk-21-runtime:latest image digest" || echo "No changes to commit" | |
- name: Create pull request | |
uses: peter-evans/create-pull-request@v7 | |
with: | |
title: 'Update ubi8/openjdk-21-runtime:latest image digest' |