🏗️ chore: Set Up Docker Buildx for GitNexus Image GHA Cache Export (#12619)

The first GHCR build on main failed with:
  ERROR: Cache export is not supported for the docker driver.

The default docker driver on ubuntu-latest runners can't export
cache to type=gha. docker/setup-buildx-action@v3 without a driver
argument defaults to docker-container, which supports both
cache-from and cache-to. Gated on the same condition as the build
step so it only runs when an image rebuild is actually needed.
This commit is contained in:
Danny Avila 2026-04-11 13:18:17 -04:00 committed by GitHub
parent 8eab39bc8f
commit 39fb93f6c4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -111,6 +111,10 @@ jobs:
id: tag
run: echo "value=v${{ env.GITNEXUS_VERSION }}" >> "$GITHUB_OUTPUT"
- name: Set up Docker Buildx
if: steps.changes.outputs.changed == 'true' || github.event_name == 'workflow_dispatch'
uses: docker/setup-buildx-action@v3
- name: Log in to GHCR
if: steps.changes.outputs.changed == 'true' || github.event_name == 'workflow_dispatch'
uses: docker/login-action@v3