Skip to content

Regular base image update check #119

Regular base image update check

Regular base image update check #119

name: Regular base image update check
# SOURCE: https://www.flypenguin.de/2021/07/30/auto-rebuild-docker-images-if-base-image-changes-using-github-actions/
on:
push:
branches: [ main ]
schedule:
- cron: "13 23 * * 5"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Docker Image Update Checker
id: baseupdatecheck
uses: lucacome/[email protected]
with:
base-image: library/caddy:alpine
image: cryorig/caddyflare
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
if: steps.baseupdatecheck.outputs.needs-updating == 'true'
- name: Build and push Docker images
uses: docker/build-push-action@v5
with:
context: "${{ github.workspace }}"
push: true
tags: cryorig/caddyflare:latest
outputs: type=image,compression=gzip
if: steps.baseupdatecheck.outputs.needs-updating == 'true'
- name: Docker Hub Description
uses: peter-evans/dockerhub-description@v4
with:
short-description: ${{ github.event.repository.description }}
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
repository: cryorig/caddyflare