name: Image Build Probe on: push: paths: - ".forgejo/workflows/image-build.yaml" - "Dockerfile" workflow_dispatch: env: REGISTRY: forgejo.coulomb.social IMAGE_NAME: coulomb/forgejo-actions-probe DOCKER_HOST: tcp://127.0.0.1:2375 jobs: image-build: runs-on: container-build steps: - name: Checkout uses: actions/checkout@v4 - name: Build and push image env: REGISTRY_USER: ${{ secrets.REGISTRY_USER }} REGISTRY_TOKEN: ${{ secrets.REGISTRY_TOKEN }} run: | set -eu 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 export PATH="${HOME}/bin:${PATH}" docker version echo "${REGISTRY_TOKEN}" | docker login "${REGISTRY}" -u "${REGISTRY_USER}" --password-stdin TAG="${GITHUB_SHA:-manual}" SHORT="${TAG:0:7}" IMAGE="${REGISTRY}/${IMAGE_NAME}" docker build -t "${IMAGE}:latest" -t "${IMAGE}:${SHORT}" . docker push "${IMAGE}:latest" docker push "${IMAGE}:${SHORT}" echo "pushed ${IMAGE}:latest and ${IMAGE}:${SHORT}"