publish step
Some checks failed
Build images / build-and-push-arch (push) Failing after 35s

This commit is contained in:
Julius Zeidler 2025-04-02 16:15:26 +02:00
parent 32934b4400
commit 0842c36495

View file

@ -1,19 +1,60 @@
name: ci name: Build images
on: on:
push: 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: jobs:
docker: build-and-push-arch:
runs-on: catthehacker runs-on: catthehacker
environment: deploy
steps: 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: Install requirements
run: |
pip install -r requirements.txt
- name: Generate the Ansible Builder context
run: |
ansible-builder create -v 3
- name: Login to the registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.PACKAGE_TOKEN }}
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v3
with:
config-inline: |
[registry."${{ env.REGISTRY }}"]
ca=["/usr/local/share/ca-certificates/homelab-ca.crt"]
- name: Get Git commit timestamps - name: Build and push
run: echo "TIMESTAMP=$(git log -1 --pretty=%ct)" >> $GITHUB_ENV
- name: Build
uses: docker/build-push-action@v6 uses: docker/build-push-action@v6
with: with:
tags: user/app:latest context: context
env: push: true
SOURCE_DATE_EPOCH: ${{ env.TIMESTAMP }} provenance: false
platforms: linux/amd64, linux/arm64
tags: ${{ env.REGISTRY }}/${{ github.actor }}/${{ env.CONTAINER_NAME }}:latest