docker-swiss-army-knife/.forgejo/workflows/publish.yaml
Julius Zeidler 2de051fae7
Some checks failed
build-airflow-image / build (push) Failing after 7s
Build images / build-and-push (push) Successful in 8s
kaniko / prepare (push) Failing after 8s
kaniko / build (push) Failing after 1s
Build images / build (push) Failing after 20s
fix publish?
2025-04-07 12:04:34 +02:00

52 lines
1.4 KiB
YAML

name: Build images
on:
push:
branches:
- main
# Uncomment to run only when specific files change
# paths:
# - '**/ansible-navigator.yaml'
# - '**/execution-environment.yml'
env:
# Set this to the public IP or hostname of your registry,
# whichever you use to reach it from your desktop/laptop
FORGEJO_HOST: code.zeidler.dev
CONTAINER_NAME: homelab-ee-single
jobs:
build-and-push:
runs-on: catthehacker
environment: deploy
steps:
- name: Prepare environment variables
run: |
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
echo REGISTRY=${{ env.FORGEJO_HOST }} >> $GITHUB_ENV
- name: Checkout the repo
uses: actions/checkout@v4
- name: Login to the registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.PACKAGE_TOKEN }}
build:
runs-on: docker-cli
environment: deploy
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
driver: docker-container
- name: Build and push
uses: docker/build-push-action@v6
with:
context: context
push: true
provenance: false
platforms: linux/amd64, linux/arm64
tags: ${{ env.REGISTRY }}/${{ github.actor }}/${{ env.CONTAINER_NAME }}:latest