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>
29 lines
902 B
YAML
29 lines
902 B
YAML
name: Build and push image
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
|
|
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
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Log in to Forgejo registry
|
|
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login git.rosenvold.tech -u "${{ github.actor }}" --password-stdin
|
|
|
|
- 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: Push image
|
|
run: docker push git.rosenvold.tech/lucas/rosenvold-core --all-tags
|