Drop buildx, use plain docker build/push
Some checks failed
Build and push image / build-and-push (push) Failing after 15s
Some checks failed
Build and push image / build-and-push (push) Failing after 15s
docker/setup-buildx-action resolves its builder endpoint from the docker context file rather than the live DOCKER_HOST env var, so it still tried the (absent) unix socket. Plain docker CLI commands honor DOCKER_HOST directly, matching what the runner now provides. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
parent
f22e93963e
commit
73144b91aa
1 changed files with 15 additions and 21 deletions
|
|
@ -8,10 +8,11 @@ on:
|
|||
jobs:
|
||||
build-and-push:
|
||||
runs-on: docker
|
||||
# actions/checkout & co. are JS actions and need Node, so the job
|
||||
# container has to be a Node image (not a bare docker CLI image). The
|
||||
# runner already provides a privileged container wired up to its own
|
||||
# dind sidecar via DOCKER_HOST, so we just need the docker CLI itself.
|
||||
# actions/checkout is a JS action and needs Node, so the job container
|
||||
# has to be a Node image. The runner already provides a privileged
|
||||
# container wired up to its own dind sidecar via DOCKER_HOST, so we
|
||||
# just need the docker CLI itself. Plain `docker` commands (rather
|
||||
# than buildx-based actions) pick up DOCKER_HOST directly.
|
||||
container: node:20-bookworm
|
||||
steps:
|
||||
- name: Checkout
|
||||
|
|
@ -27,24 +28,17 @@ jobs:
|
|||
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian $(. /etc/os-release && echo $VERSION_CODENAME) stable" \
|
||||
> /etc/apt/sources.list.d/docker.list
|
||||
apt-get update
|
||||
apt-get install -y --no-install-recommends docker-ce-cli docker-buildx-plugin
|
||||
apt-get install -y --no-install-recommends docker-ce-cli
|
||||
|
||||
- name: Log in to Forgejo registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: git.rosenvold.tech
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login git.rosenvold.tech -u "${{ github.actor }}" --password-stdin
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
- name: Build image
|
||||
run: |
|
||||
docker build \
|
||||
-t git.rosenvold.tech/lucas/rosenvold-core:latest \
|
||||
-t git.rosenvold.tech/lucas/rosenvold-core:${{ github.sha }} \
|
||||
-f Containerfile .
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
file: ./Containerfile
|
||||
push: true
|
||||
tags: |
|
||||
git.rosenvold.tech/lucas/rosenvold-core:latest
|
||||
git.rosenvold.tech/lucas/rosenvold-core:${{ github.sha }}
|
||||
- name: Push image
|
||||
run: docker push git.rosenvold.tech/lucas/rosenvold-core --all-tags
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue