Move template to template/ dir, add CI workflow, use pre-built image
Some checks failed
Build-Publish / build (linux/amd64) (push) Successful in 13s
Build-Publish / build (linux/arm64) (push) Successful in 40s
Build-Publish / create-manifest (push) Failing after 1s

This commit is contained in:
j
2026-03-07 19:54:06 +13:00
parent d8754a9d92
commit 070cca7c8d
17 changed files with 89 additions and 13 deletions

View File

@@ -0,0 +1,70 @@
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 -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