ci: build and push the image with plain docker

Drops docker/login-action, docker/setup-buildx-action and
docker/build-push-action. This is a single-platform build of one
Dockerfile, which dockerd's integrated BuildKit already does; the only
thing the actions added was buildx's docker-container driver, and
standing that up means pulling moby/buildkit and handing it the socket
for no gain.

docker login reads the token from stdin rather than -p, and a logout step
runs with always() so a failed build does not leave credentials in
~/.docker/config.json on this persistent runner.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-08-28 16:00:26 +02:00
co-authored by Claude Opus 5
parent d4f23f5b87
commit f12fa03f1c
+26 -16
View File
@@ -125,23 +125,33 @@ jobs:
LC_ALL: en_US.UTF-8 LC_ALL: en_US.UTF-8
run: ./scripts/build-release.ps1 -Targets win,linux-appimage -Tag $env:TAG run: ./scripts/build-release.ps1 -Targets win,linux-appimage -Tag $env:TAG
- name: Log in to git.azuze.fr # Plain docker rather than docker/login-action + setup-buildx-action +
uses: docker/login-action@v3 # build-push-action. This is a single-platform build of one Dockerfile, which
with: # dockerd's own integrated BuildKit does; the actions' only added value here
registry: git.azuze.fr # would be the docker-container driver, and standing that up means pulling
username: ${{ secrets.BUILD_USER }} # moby/buildkit and mounting the socket into it for no gain.
password: ${{ secrets.BUILD_TOKEN }} #
# --password-stdin, never -p: an argument is visible in ps and in the daemon's
- uses: docker/setup-buildx-action@v3 # process list for as long as the login runs.
- name: Build and push image - name: Build and push image
uses: docker/build-push-action@v6 env:
with: TAG: ${{ steps.vars.outputs.tag }}
context: . REGISTRY_USER: ${{ secrets.BUILD_USER }}
push: true REGISTRY_TOKEN: ${{ secrets.BUILD_TOKEN }}
tags: | run: |
${{ env.IMAGE }}:latest set -euo pipefail
${{ env.IMAGE }}:${{ steps.vars.outputs.tag }} printf '%s' "$REGISTRY_TOKEN" \
| docker login git.azuze.fr -u "$REGISTRY_USER" --password-stdin
docker build -t "$IMAGE:latest" -t "$IMAGE:$TAG" .
docker push "$IMAGE:latest"
docker push "$IMAGE:$TAG"
# This runner is a persistent host, so the credentials written by docker login
# would otherwise sit in ~/.docker/config.json between jobs. always(): a failed
# build is exactly when they must not be left behind.
- name: Log out of git.azuze.fr
if: always()
run: docker logout git.azuze.fr || true
- name: Publish Gitea release - name: Publish Gitea release
env: env: