splitting responsibility for multi arch containers

This commit is contained in:
Andy Pack 2025-03-15 19:41:13 +00:00
parent ee3832b8ed
commit d42da15626
Signed by: sarsoo
GPG Key ID: A55BA3536A5E0ED7
2 changed files with 125 additions and 22 deletions
.gitea/workflows
.github/workflows

@ -32,11 +32,8 @@ jobs:
build-Docker:
runs-on: ${{ matrix.arch }}
name: Build Containers
strategy:
matrix:
arch: ['ubuntu-latest']
runs-on: ubuntu-latest
name: Build Container (amd64)
needs: [build] # for ignoring bad builds
if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/'))
@ -45,9 +42,6 @@ jobs:
with:
github-server-url: https://gitea.sheep-ghoul.ts.net
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
@ -62,11 +56,68 @@ jobs:
uses: docker/build-push-action@v5
with:
push: true
platforms: linux/amd64,linux/arm64
tags: gitea.sheep-ghoul.ts.net/sarsoo/overflow:latest
tags: gitea.sheep-ghoul.ts.net/sarsoo/overflow:latest-amd64
file: Dockerfile
context: .
# build-Docker-Arm:
# runs-on: ubuntu-latest-arm
# name: Build Container (arm64)
# needs: [build] # for ignoring bad builds
# if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/'))
# steps:
# - uses: actions/checkout@v4
# with:
# github-server-url: https://gitea.sheep-ghoul.ts.net
# - name: Set up Docker Buildx
# uses: docker/setup-buildx-action@v2
# - name: Login to DockerHub
# uses: docker/login-action@v2
# with:
# registry: gitea.sheep-ghoul.ts.net
# username: ${{ secrets.DOCKERHUB_USERNAME }}
# password: ${{ secrets.DOCKERHUB_TOKEN }}
# - name: Build Web Container
# uses: docker/build-push-action@v5
# with:
# push: true
# tags: gitea.sheep-ghoul.ts.net/sarsoo/overflow:latest-arm64
# file: Dockerfile
# context: .
packageManifest:
runs-on: ubuntu-latest
name: Container Manifest
needs: [ build-Docker, build-Docker-Arm ] # for ignoring bad builds
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
steps:
- uses: actions/checkout@v4
with:
github-server-url: https://gitea.sheep-ghoul.ts.net
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to DockerHub
uses: docker/login-action@v2
with:
registry: gitea.sheep-ghoul.ts.net
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Create and push manifest images
uses: Noelware/docker-manifest-action@master # or use a pinned version in the Releases tab
with:
inputs: gitea.sheep-ghoul.ts.net/sarsoo/overflow:latest
images: gitea.sheep-ghoul.ts.net/sarsoo/overflow:latest-amd64
# images: gitea.sheep-ghoul.ts.net/sarsoo/overflow:latest-amd64,gitea.sheep-ghoul.ts.net/sarsoo/overflow:latest-arm64
push: true
publish:
runs-on: ubuntu-latest
name: Publish Charts

@ -29,20 +29,14 @@ jobs:
build-Docker:
runs-on: ${{ matrix.arch }}
name: Build Containers
strategy:
matrix:
arch: ['ubuntu-latest']
runs-on: ubuntu-latest
name: Build Container (amd64)
needs: [build] # for ignoring bad builds
if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/'))
steps:
- uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
@ -56,12 +50,70 @@ jobs:
uses: docker/build-push-action@v5
with:
push: true
platforms: linux/amd64,linux/arm64
tags: |
sarsoo/overflow:latest
sarsoo/overflow:${{ github.ref_name }}
sarsoo/overflow:latest-amd64
sarsoo/overflow:${{ github.ref_name }}-amd64
file: Dockerfile
build-Docker-Arm:
runs-on: ubuntu-24.04-arm
name: Build Container (arm64)
needs: [build] # for ignoring bad builds
if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/'))
steps:
- uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build Web Container
uses: docker/build-push-action@v5
with:
push: true
tags: |
sarsoo/overflow:latest-arm64
sarsoo/overflow:${{ github.ref_name }}-arm64
file: Dockerfile
packageManifest:
runs-on: ubuntu-latest
name: Container Manifest
needs: [ build-Docker, build-Docker-Arm ] # for ignoring bad builds
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
steps:
- uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Create and push manifest images
uses: Noelware/docker-manifest-action@master # or use a pinned version in the Releases tab
with:
inputs: sarsoo/overflow:latest
images: sarsoo/overflow:latest-amd64,sarsoo/overflow:latest-arm64
push: true
- name: Create and push manifest images
uses: Noelware/docker-manifest-action@master # or use a pinned version in the Releases tab
with:
inputs: sarsoo/overflow:${{ github.ref_name }}
images: sarsoo/overflow:${{ github.ref_name }}-amd64,sarsoo/overflow:${{ github.ref_name }}-arm64
push: true
# deploy:
# runs-on: ubuntu-latest
@ -80,7 +132,7 @@ jobs:
# oauth-client-id: ${{ secrets.TS_OAUTH_CLIENT_ID }}
# oauth-secret: ${{ secrets.TS_OAUTH_SECRET }}
# tags: tag:ci
# version: 1.68.1
# version: 1.80.3
# - name: Deploy
# run: ssh -o StrictHostKeyChecking=no ${{ secrets.TS_SSH }} -t "cd overflow/ && docker compose up -d --pull always"