From 39fcc6f086cad0c4f759353f2141d811dc05c422 Mon Sep 17 00:00:00 2001 From: Kevin Date: Mon, 2 Jan 2023 10:18:11 +0100 Subject: [PATCH] Update github actions --- .github/workflows/auto-update.yml | 32 +++++++++++++++++++++++++++++++ .github/workflows/build.yml | 3 +-- 2 files changed, 33 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/auto-update.yml diff --git a/.github/workflows/auto-update.yml b/.github/workflows/auto-update.yml new file mode 100644 index 0000000..2bd30f6 --- /dev/null +++ b/.github/workflows/auto-update.yml @@ -0,0 +1,32 @@ +name: Auto update +on: + schedule: + - cron: "0 0 * * 0" + workflow_dispatch: + +jobs: + check: + name: Check if out-of-date + runs-on: ubuntu-22.04 + steps: + - name: Checkout + uses: actions/checkout@v2.6.0 + + - name: Check parent image out-of-date + id: check + uses: twiddler/is-my-docker-parent-image-out-of-date@v1 + with: + parent-image: python:slim + my-image: ghcr.io/brugr/deemon-simple:latest + + - name: Echo output + run: | + echo "${{ steps.check.outputs.out-of-date }}" + + outputs: + out-of-date: ${{ steps.check.outputs.out-of-date }} + + build: + needs: [check] + uses: ./.github/workflows/build.yml + if: needs.check.outputs.out-of-date == 'true' \ No newline at end of file diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 440b4e3..859c836 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,9 +4,8 @@ on: paths: - 'Containerfile' - 'requirements.txt' - schedule: - - cron: '0 0 * * 0' workflow_dispatch: + workflow_call: env: IMAGE_NAME: deemon-simple