[skip ci] Update README, add skip ci support for workflow
All checks were successful
Build Docker image / Build image (push) Has been skipped

This commit is contained in:
Marko Korhonen 2024-04-04 08:58:40 +03:00
parent be780088af
commit fc24126f69
Signed by: FunctionalHacker
GPG key ID: A7F78BCB859CD890
2 changed files with 12 additions and 2 deletions

View file

@ -1,17 +1,23 @@
name: Build Docker image
on:
push:
schedule:
- cron: "0 12 * * *"
jobs:
build_image:
name: Build image
runs-on: docker
if: env.SCHEDULED == 'true' || !contains(github.event.commits[0].message, '[skip ci]')
env:
VERSION: 22.04
SCHEDULED: ${{ github.event_name == 'schedule' }}
PUSHED: ${{ github.event_name == 'push' }}
REGISTRY: git.korhonen.cc
REPO: ${{ env.REGISTRY }}/functionalhacker/ubuntu-act
runs-on: docker
steps:
- name: Check if update available
if: env.SCHEDULED == 'true'
@ -20,12 +26,15 @@ jobs:
with:
base-image: docker://ghcr.io/catthehacker/ubuntu:act-${{ env.VERSION }}
derived-image: docker://${{ env.REPO }}:latest
- name: Check result
if: env.SCHEDULED == 'true'
run: echo "Needs updating = ${{ steps.check.outputs.differs }}"
- name: Set up Docker Buildx
if: env.PUSHED == 'true' || steps.check.outputs.differs == 'true'
uses: docker/setup-buildx-action@v3
- name: Login to Docker registry
if: env.PUSHED == 'true' || steps.check.outputs.differs == 'true'
uses: docker/login-action@v3
@ -33,6 +42,7 @@ jobs:
registry: ${{ env.REGISTRY }}
username: ${{ secrets.REGISTRY_USER }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Build and push image
if: env.PUSHED == 'true' || steps.check.outputs.differs == 'true'
uses: docker/build-push-action@v5

View file

@ -4,4 +4,4 @@ Based on the link:https://github.com/catthehacker/docker_images[ghcr.io/cattheha
* link:https://github.com/containers/skopeo[skopeo]
Image is built at 12:00 EET every day if upstream updates are available.
Image is built at 12:00 EET/EEST every day if upstream updates are available.