Fix image-build: single-step docker install+push
Some checks failed
/ container-probe (push) Successful in 1s
Image Build Probe / image-build (push) Failing after 1s
/ probe (push) Successful in 0s

This commit is contained in:
forgejo_admin 2026-07-03 22:41:51 +00:00
parent cc12a1270f
commit b25a6f042f

View file

@ -19,22 +19,17 @@ jobs:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Install docker CLI (static binary) - name: Build and push image
env:
REGISTRY_USER: ${{ secrets.REGISTRY_USER }}
REGISTRY_TOKEN: ${{ secrets.REGISTRY_TOKEN }}
run: | run: |
set -eu set -eu
mkdir -p "${HOME}/bin" mkdir -p "${HOME}/bin"
wget -qO- https://download.docker.com/linux/static/stable/x86_64/docker-27.3.1.tgz | tar xz --strip-components=1 -C "${HOME}/bin" docker/docker wget -qO- https://download.docker.com/linux/static/stable/x86_64/docker-27.3.1.tgz | tar xz --strip-components=1 -C "${HOME}/bin" docker/docker
echo "${HOME}/bin" >> "${GITHUB_PATH}" export PATH="${HOME}/bin:${PATH}"
"${HOME}/bin/docker" version docker version
echo "${REGISTRY_TOKEN}" | docker login "${REGISTRY}" -u "${REGISTRY_USER}" --password-stdin
- name: Login to Forgejo registry
run: |
set -eu
echo "${{ secrets.REGISTRY_TOKEN }}" | docker login "${REGISTRY}" -u "${{ secrets.REGISTRY_USER }}" --password-stdin
- name: Build and push
run: |
set -eu
TAG="${GITHUB_SHA:-manual}" TAG="${GITHUB_SHA:-manual}"
SHORT="${TAG:0:7}" SHORT="${TAG:0:7}"
IMAGE="${REGISTRY}/${IMAGE_NAME}" IMAGE="${REGISTRY}/${IMAGE_NAME}"