fix(ci): remove GHA cache + simplify Push to match auth (CAR-1357, CAR-1362)
CI / lint (pull_request) Successful in 6s
CI / typecheck (pull_request) Successful in 20s
CI / test (pull_request) Successful in 26s
CI / build-and-push (pull_request) Has been skipped

Two related fixes for build-and-push on Gitea:

1. Drop `cache-from: type=gha` and `cache-to: type=gha,mode=max` from both
   Build and Push steps. `type=gha` is the GitHub Actions Cache backend,
   which does not exist on git.farh.net. The cache export failure was
   marking the Build step failed and skipping the Push step.

2. Simplify the Push step to match the proven-green `cartsnitch/auth/ci.yml`
   pattern: drop `file: ./Dockerfile` (default is `Dockerfile`) and
   `build-args: APT_CACHE_BUST=...` (only used to bust apt cache in stage 1
   of multi-stage build). With these extra params removed, the buildx
   "unknown" error after `pushing layers 0.2s done` resolves itself.

Combined diff: 6 lines removed from .gitea/workflows/ci.yml. This is a
config simplification only — no app code, no build context, no test
changes.

Validated on dev: PR #52 (cache removal) + PR #53 (Push simplification)
merged → run 3458 build-and-push success → image
`git.farh.net/cartsnitch/api:sha-a3a01eefe2e5a7fc4559b5c82ef76f91a7385a50`
present in the registry.

Refs: CAR-1362, CAR-1356, CAR-1330, CAR-1357.

Co-authored-by: Paperclip <noreply@paperclip.ing>
This commit is contained in:
2026-06-10 04:16:21 +00:00
parent e41cd3c6f0
commit 96ae9314bf
-6
View File
@@ -140,8 +140,6 @@ jobs:
labels: ${{ steps.meta.outputs.labels }}
build-args: |
APT_CACHE_BUST=${{ github.run_id }}
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Scan api image for vulnerabilities
uses: anchore/scan-action@v5
@@ -162,13 +160,9 @@ jobs:
uses: docker/build-push-action@v6
with:
context: .
file: ./Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
APT_CACHE_BUST=${{ github.run_id }}
cache-from: type=gha
- name: Create git tag
if: github.event_name == 'push' && github.ref == 'refs/heads/main'