This commit is contained in:
parent
31f55fd29f
commit
d3046583fa
2 changed files with 51 additions and 0 deletions
44
.forgejo/workflows/build.yaml
Normal file
44
.forgejo/workflows/build.yaml
Normal file
|
@ -0,0 +1,44 @@
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
schedule:
|
||||||
|
- cron: '0 12 * * *'
|
||||||
|
jobs:
|
||||||
|
build_image:
|
||||||
|
name: Build image
|
||||||
|
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
|
||||||
|
id: check
|
||||||
|
uses: https://github.com/ClementTsang/docker-check-base-image-diff@v0.0.2
|
||||||
|
with:
|
||||||
|
base-image: docker://ghcr.io/catthehacker/ubuntu:act-${{ env.VERSION }}
|
||||||
|
derived-image: docker://${{ env.REPO }}:latest
|
||||||
|
- name: Check result
|
||||||
|
if: env.SCHEDULED
|
||||||
|
run: echo "Needs updating = ${{ steps.check.outputs.differs }}"
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
if: env.PUSHED || ${{ steps.check.outputs.differs == true }}
|
||||||
|
uses: docker/setup-buildx-action@v3
|
||||||
|
- name: Login to Docker registry
|
||||||
|
if: env.PUSHED || ${{ steps.check.outputs.differs == true }}
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
registry: ${{ env.REGISTRY }}
|
||||||
|
username: ${{ secrets.REGISTRY_USER }}
|
||||||
|
password: ${{ secrets.REGISTRY_PASSWORD }}
|
||||||
|
- name: Build and push image
|
||||||
|
if: env.PUSHED || ${{ steps.check.outputs.differs == true }}
|
||||||
|
uses: docker/build-push-action@v5
|
||||||
|
with:
|
||||||
|
push: true
|
||||||
|
build-args: VERSION=${{ env.VERSION }}
|
||||||
|
tags: |
|
||||||
|
${{ env.REPO }}:latest
|
||||||
|
${{ env.REPO }}:${{ env.VERSION }}
|
7
README.adoc
Normal file
7
README.adoc
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
= Ubuntu Actions runner image
|
||||||
|
|
||||||
|
Based on the link:https://github.com/catthehacker/docker_images[ghcr.io/catthehacker/ubuntu:act-22.04] runner image with the following tools added
|
||||||
|
|
||||||
|
* link:https://github.com/containers/skopeo[skopeo]
|
||||||
|
|
||||||
|
Image is built at 12:00 EET every day if upstream updates are available.
|
Loading…
Add table
Add a link
Reference in a new issue