actions/checkout defaults to depth=1, and Gitea aborted generating that pack with a bad pack header protocol error on every retry, failing the run before any image was built. Same fix already applied on the server repo; applied here to all four workflows so the edge-node, op25 and icecast images can build. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
57 lines
1.9 KiB
YAML
57 lines
1.9 KiB
YAML
name: Build edge-node
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches: [main, master]
|
|
paths:
|
|
- "drb-edge-node/**"
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
packages: write
|
|
env:
|
|
CONTAINER_NAME: edge-node
|
|
steps:
|
|
# Full fetch: Gitea fails to pack the default depth=1 shallow clone
|
|
# ("bad pack header"). Don't set this back to a shallow fetch.
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- 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
|
|
|
|
- uses: docker/build-push-action@v6
|
|
with:
|
|
context: ./drb-edge-node
|
|
file: ./drb-edge-node/Dockerfile
|
|
platforms: 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 }}:latest
|
|
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
|