Stop overriding job container, use runner default
Some checks failed
Build and push image / build-and-push (push) Failing after 3s
Some checks failed
Build and push image / build-and-push (push) Failing after 3s
Setting container: node:20-bookworm replaced the runner's default job image wholesale, which is where DOCKER_HOST and the docker CLI were actually pre-configured. Use the default image so that config applies. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
parent
73144b91aa
commit
76627791b0
1 changed files with 3 additions and 18 deletions
|
|
@ -7,29 +7,14 @@ on:
|
|||
|
||||
jobs:
|
||||
build-and-push:
|
||||
# Use the runner's default job image as-is: it's pre-configured with
|
||||
# DOCKER_HOST pointing at the runner's dind sidecar (and privileged
|
||||
# access). Overriding `container:` here loses that configuration.
|
||||
runs-on: docker
|
||||
# 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
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install Docker CLI
|
||||
run: |
|
||||
apt-get update
|
||||
apt-get install -y --no-install-recommends ca-certificates curl
|
||||
install -m 0755 -d /etc/apt/keyrings
|
||||
curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc
|
||||
chmod a+r /etc/apt/keyrings/docker.asc
|
||||
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
|
||||
|
||||
- name: Log in to Forgejo registry
|
||||
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login git.rosenvold.tech -u "${{ github.actor }}" --password-stdin
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue