fix: replace Docker Buildx with plain docker build/push
All checks were successful
Lint & Test / test (push) Successful in 1m51s

Buildx requires container networking that fails on TrueNAS runners.
Plain docker build + docker push works without Buildx setup.
This commit is contained in:
2026-03-22 03:20:37 +03:00
parent 47a62b1aed
commit 39e3d64654

View File

@@ -160,16 +160,6 @@ jobs:
with: with:
fetch-depth: 0 fetch-depth: 0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Gitea Container Registry
uses: docker/login-action@v3
with:
registry: ${{ gitea.server_url }}
username: ${{ gitea.actor }}
password: ${{ secrets.GITEA_TOKEN }}
- name: Extract version metadata - name: Extract version metadata
id: meta id: meta
run: | run: |
@@ -182,21 +172,37 @@ jobs:
echo "version=$VERSION" >> "$GITHUB_OUTPUT" echo "version=$VERSION" >> "$GITHUB_OUTPUT"
echo "registry=$REGISTRY" >> "$GITHUB_OUTPUT" echo "registry=$REGISTRY" >> "$GITHUB_OUTPUT"
# Build tag list: version + latest (only for stable releases) - name: Login to Gitea Container Registry
TAGS="$REGISTRY:$TAG,$REGISTRY:$VERSION" run: |
if ! echo "$TAG" | grep -qE '(alpha|beta|rc)'; then echo "${{ secrets.GITEA_TOKEN }}" | docker login \
TAGS="$TAGS,$REGISTRY:latest" "$(echo '${{ gitea.server_url }}' | sed 's|https\?://||')" \
fi -u "${{ gitea.actor }}" --password-stdin
echo "tags=$TAGS" >> "$GITHUB_OUTPUT"
- name: Build and push Docker image - name: Build Docker image
uses: docker/build-push-action@v5 run: |
with: TAG="${{ gitea.ref_name }}"
context: ./server REGISTRY="${{ steps.meta.outputs.registry }}"
push: true
tags: ${{ steps.meta.outputs.tags }} docker build \
labels: | --label "org.opencontainers.image.version=${{ steps.meta.outputs.version }}" \
org.opencontainers.image.version=${{ steps.meta.outputs.version }} --label "org.opencontainers.image.revision=${{ gitea.sha }}" \
org.opencontainers.image.revision=${{ gitea.sha }} -t "$REGISTRY:$TAG" \
cache-from: type=gha -t "$REGISTRY:${{ steps.meta.outputs.version }}" \
cache-to: type=gha,mode=max ./server
# Tag as latest only for stable releases
if ! echo "$TAG" | grep -qE '(alpha|beta|rc)'; then
docker tag "$REGISTRY:$TAG" "$REGISTRY:latest"
fi
- name: Push Docker image
run: |
TAG="${{ gitea.ref_name }}"
REGISTRY="${{ steps.meta.outputs.registry }}"
docker push "$REGISTRY:$TAG"
docker push "$REGISTRY:${{ steps.meta.outputs.version }}"
if ! echo "$TAG" | grep -qE '(alpha|beta|rc)'; then
docker push "$REGISTRY:latest"
fi