Files
WS14-Docker-Linux-Server/.github/workflows/main.yml
Codex Agent d21b1e9877
Some checks failed
Build SS14 Watchdog Server / build-amd64 (push) Successful in 2m47s
Build SS14 Watchdog Server / build-arm64 (push) Successful in 32m28s
Build SS14 Watchdog Server / create-manifest (push) Failing after 6s
ci: Add multi-arch manifest with :main tag
- arm64 build pushes :main-arm64
- amd64 build pushes :main-amd64
- New create-manifest job combines into :main (auto-selects arch)
- Manifest job can run on any self-hosted runner

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-16 08:37:37 +01:00

92 lines
2.9 KiB
YAML

#
name: Build SS14 Watchdog Server
on:
push:
branches: ['main']
workflow_dispatch:
env:
REGISTRY: git.wylab.me
IMAGE_NAME: wylab/ws14-docker-linux-server
BUILDKIT_PROGRESS: plain
jobs:
build-arm64:
runs-on: [self-hosted, macos-arm64]
timeout-minutes: 60
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to the container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ secrets.REGISTRY_USERNAME || github.actor }}
password: ${{ secrets.REGISTRY_PASSWORD || secrets.GITHUB_TOKEN }}
- name: Build and push Docker image (arm64)
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/arm64
cache-from: type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:buildcache-arm64
cache-to: type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:buildcache-arm64,mode=max
push: true
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:main-arm64
build-amd64:
runs-on: [self-hosted, linux-amd64]
timeout-minutes: 60
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to the container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ secrets.REGISTRY_USERNAME || github.actor }}
password: ${{ secrets.REGISTRY_PASSWORD || secrets.GITHUB_TOKEN }}
- name: Build and push Docker image (amd64)
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64
cache-from: type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:buildcache-amd64
cache-to: type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:buildcache-amd64,mode=max
push: true
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:main-amd64
create-manifest:
needs: [build-amd64, build-arm64]
runs-on: [self-hosted]
steps:
- name: Log in to the container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ secrets.REGISTRY_USERNAME || github.actor }}
password: ${{ secrets.REGISTRY_PASSWORD || secrets.GITHUB_TOKEN }}
- name: Create and push multi-arch manifest
run: |
docker manifest create ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:main \
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:main-amd64 \
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:main-arm64
docker manifest push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:main