Check container registry #601
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: 'Check container registry' | |
# **What it does**: Checks software new releases, then notify me. | |
on: | |
push: | |
branches: | |
- update | |
schedule: | |
- cron: '30 15 * * *' # Run everyday at 15:30 UTC | |
# This allows a subsequently queued workflow run to interrupt previous runs | |
concurrency: | |
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}' | |
cancel-in-progress: true | |
jobs: | |
Check-container: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
# - name: Install nvchecker | |
# run: sudo apt-get update && sudo apt-get install -y nvchecker | |
- name: Install nvchecker | |
uses: awalsh128/cache-apt-pkgs-action@latest | |
with: | |
packages: nvchecker | |
version: 1.0 | |
- name: Check versions | |
run: nvchecker -t 3 -c ./container.config.toml | |
- name: Compare versions | |
run: | | |
nvcmp -c ./container.config.toml | tee /tmp/nvcmp_out.txt && mv container.new.json container.json | |
echo 'NV<<EOF' >> $GITHUB_ENV | |
cat /tmp/nvcmp_out.txt | sed 's/^/- /' >> $GITHUB_ENV | |
echo 'EOF' >> $GITHUB_ENV | |
echo "NV_COUNT=$(wc -l /tmp/nvcmp_out.txt | awk '{print $1}')" >> $GITHUB_ENV | |
- name: Create pull request | |
if: ${{ env.NV }} | |
uses: peter-evans/create-pull-request@v7 | |
with: | |
commit-message: ${{ env.NV_COUNT }} container image updated | |
branch: container_new_version | |
delete-branch: true | |
base: main | |
title: 'Container bump report' | |
body: | | |
Container images | |
${{ env.NV }} | |
labels: | | |
container | |
report | |
automated pr | |
draft: false |