Files
infmap/.gitea/workflows/build-publish.yaml
j 601079e601
All checks were successful
Build-Publish / build (linux/amd64) (push) Successful in 4s
Build-Publish / build (linux/arm64) (push) Successful in 11s
Build-Publish / create-manifest (push) Successful in 2s
Disable Docker build provenance to fix multi-arch manifest
2026-03-07 20:03:23 +13:00

71 lines
2.0 KiB
YAML

name: Build-Publish
run-name: Build and publish infmap Docker image
on: [push]
defaults:
run:
shell: bash
jobs:
build:
strategy:
matrix:
platform:
- linux/amd64
- linux/arm64
runs-on: ${{ matrix.platform }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Login to Gitea
uses: docker/login-action@v3
with:
registry: gitea.jde.nz
username: DoesntMatter
password: ${{ secrets.DOCKER_PUSH_TOKEN }}
- name: Build
run: |
ARCH=$(uname -m)
docker build --provenance=false -t gitea.jde.nz/public/infmap:latest-${ARCH} ./app
- name: Publish
run: |
if [ "$GITHUB_REF" = "refs/heads/main" ]; then
ARCH=$(uname -m)
docker push gitea.jde.nz/public/infmap:latest-${ARCH}
fi
create-manifest:
needs: [build]
runs-on: ubuntu-latest
steps:
- name: Login to Gitea
uses: docker/login-action@v3
with:
registry: gitea.jde.nz
username: DoesntMatter
password: ${{ secrets.DOCKER_PUSH_TOKEN }}
- name: Create and push manifest list
run: |
if [ "$GITHUB_REF" = "refs/heads/main" ]; then
docker manifest rm gitea.jde.nz/public/infmap:latest 2>/dev/null || true
docker manifest create gitea.jde.nz/public/infmap:latest \
--amend gitea.jde.nz/public/infmap:latest-x86_64 \
--amend gitea.jde.nz/public/infmap:latest-aarch64
docker manifest annotate gitea.jde.nz/public/infmap:latest \
gitea.jde.nz/public/infmap:latest-x86_64 --arch amd64
docker manifest annotate gitea.jde.nz/public/infmap:latest \
gitea.jde.nz/public/infmap:latest-aarch64 --arch arm64
docker manifest push gitea.jde.nz/public/infmap:latest
echo "Manifest list created and pushed successfully"
fi