amd64 nodes (radio-box) got 'no matching manifest for linux/amd64' on pull and had to build locally. Every image workflow now builds linux/amd64,linux/arm64. Release images treats an existing src- tag as present only if it carries both platforms, so the arm64-only src- tags pushed before this get rebuilt on the next v1 push. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
59 lines
2.3 KiB
YAML
59 lines
2.3 KiB
YAML
name: Build op25
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches: [main, master]
|
|
paths:
|
|
- "op25-container/**"
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
packages: write
|
|
env:
|
|
CONTAINER_NAME: op25-client
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: docker/setup-qemu-action@v3
|
|
|
|
- uses: docker/setup-buildx-action@v3
|
|
with:
|
|
config-inline: |
|
|
[registry."git.vpn.cusano.net"]
|
|
http = false
|
|
insecure = false
|
|
|
|
- uses: docker/login-action@v3
|
|
with:
|
|
registry: git.vpn.cusano.net
|
|
username: ${{ gitea.actor }}
|
|
password: ${{ secrets.BUILD_TOKEN }}
|
|
|
|
- name: Get version
|
|
id: meta
|
|
run: |
|
|
echo "REPO_NAME=$(echo ${GITHUB_REPOSITORY} | awk -F'/' '{print $2}')" >> $GITHUB_OUTPUT
|
|
echo "VERSION=$(git describe --tags --always | sed 's/^v//')" >> $GITHUB_OUTPUT
|
|
# Source pin (node-26#19): the git tree hash of the build context.
|
|
# A node pulls src-<tree of its own checkout> — scripts/image-tags.sh
|
|
# computes the identical value — so its code and image always match.
|
|
echo "SRC_TAG=src-$(git rev-parse HEAD:op25-container)" >> $GITHUB_OUTPUT
|
|
|
|
- uses: docker/build-push-action@v6
|
|
with:
|
|
context: ./op25-container
|
|
file: ./op25-container/Dockerfile
|
|
platforms: linux/amd64,linux/arm64
|
|
push: true
|
|
tags: |
|
|
git.vpn.cusano.net/${{ vars.DOCKER_ORG }}/${{ steps.meta.outputs.REPO_NAME }}/${{ env.CONTAINER_NAME }}:${{ steps.meta.outputs.VERSION }}
|
|
git.vpn.cusano.net/${{ vars.DOCKER_ORG }}/${{ steps.meta.outputs.REPO_NAME }}/${{ env.CONTAINER_NAME }}:${{ steps.meta.outputs.SRC_TAG }}
|
|
git.vpn.cusano.net/${{ vars.DOCKER_ORG }}/${{ steps.meta.outputs.REPO_NAME }}/${{ env.CONTAINER_NAME }}:stable
|
|
# Registry cache — avoids full recompile of GnuRadio/OP25 when only app code changes
|
|
cache-from: type=registry,ref=git.vpn.cusano.net/${{ vars.DOCKER_ORG }}/${{ steps.meta.outputs.REPO_NAME }}/${{ env.CONTAINER_NAME }}:buildcache
|
|
cache-to: type=registry,ref=git.vpn.cusano.net/${{ vars.DOCKER_ORG }}/${{ steps.meta.outputs.REPO_NAME }}/${{ env.CONTAINER_NAME }}:buildcache,mode=max
|