Update .forgejo/workflows/docker-build.yml

This commit is contained in:
2025-06-01 22:39:12 -05:00
parent c56751bbcd
commit b8c0af40a3
+18 -32
View File
@@ -4,7 +4,10 @@ on:
push: push:
branches: branches:
- main - main
pull_request: {} # Uncomment to run only when specific files change
# paths:
# - '**/ansible-navigator.yaml'
# - '**/execution-environment.yml'
env: env:
# Set this to the public IP or hostname of your registry, # Set this to the public IP or hostname of your registry,
@@ -13,39 +16,22 @@ env:
CONTAINER_NAME: radius CONTAINER_NAME: radius
jobs: jobs:
build-image: docker:
name: Build image
runs-on: JackOfAllTrades-x86 runs-on: JackOfAllTrades-x86
container:
image: node:20-bookworm
options: >-
--privileged
env:
DOCKER_HOST: "tcp://docker:2375"
DOCKER_TLS_CERTDIR: ""
services:
docker:
image: docker:24.0.5-dind
options: >-
--privileged
env:
DOCKER_TLS_CERTDIR: ""
steps: steps:
- uses: actions/checkout@v3 - name: Login to the registry
- name: Install Docker uses: docker/login-action@v3
run: | with:
apt-get update registry: ${{ env.FORGEJO_HOST }}
apt-get install -y ca-certificates curl gnupg username: ${{ github.actor }}
install -m 0755 -d /etc/apt/keyrings password: ${{ secrets.PACKAGE_TOKEN }}
curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc
chmod a+r /etc/apt/keyrings/docker.asc - name: Set up QEMU
# Add the repository to Apt sources: uses: docker/setup-qemu-action@v3
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian \ - name: Set up Docker Buildx
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \ uses: docker/setup-buildx-action@v3
tee /etc/apt/sources.list.d/docker.list > /dev/null
apt-get update
apt-get install -y docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
- name: Build and push - name: Build and push
uses: docker/build-push-action@v6 uses: docker/build-push-action@v6
with: with: