aprs.me/.forgejo/workflows/build.yaml
Graham McIntire 40ad28e97b
CI: build amd64-only via buildx with provenance/sbom off
Forgejo runner with default Docker emits OCI image-index manifests for
multi-arch + attestation builds. argocd-image-updater cannot follow the
index → manifest chain to read the Created timestamp, so it never sees
new tags. Pinning to a single linux/amd64 build with no provenance/sbom
produces a plain Docker v2 manifest that image-updater can read.
2026-04-29 12:37:50 -05:00

53 lines
1.4 KiB
YAML

name: Build and Deploy
on:
push:
branches:
- main
env:
REGISTRY: git.mcintire.me
IMAGE_NAME: graham/aprs.me
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build-and-push:
name: Build and Push Docker Image
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: https://github.com/actions/checkout@v4
- name: Install Docker CLI
run: |
apt-get update && apt-get install -y docker.io
- name: Generate image tag
id: tag
run: |
TIMESTAMP=$(date +%s)
SHORT_SHA=$(git rev-parse --short=7 HEAD | cut -c1-7)
TAG="main-${TIMESTAMP}-${SHORT_SHA}"
echo "tag=${TAG}" >> $GITHUB_OUTPUT
- name: Log in to container registry
run: echo "${{ secrets.REGISTRY_PASSWORD }}" | docker login ${{ secrets.REGISTRY_URL }} -u ${{ secrets.REGISTRY_USER }} --password-stdin
- name: Set up Docker Buildx
uses: https://github.com/docker/setup-buildx-action@v3
- name: Build and push Docker image
uses: https://github.com/docker/build-push-action@v5
with:
context: .
push: true
platforms: linux/amd64
provenance: false
sbom: false
tags: |
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.tag.outputs.tag }}
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:main