Update .forgejo/workflows/docker-build.yml

This commit is contained in:
2025-06-01 21:58:43 -05:00
parent 6ca99065c6
commit ec91c3dfcd
+36 -35
View File
@@ -1,42 +1,43 @@
name: Docker Build single node name: Docker Build single node
on: on:
push: push:
branches: branches:
- main - main
# Uncomment to run only when specific files change pull_request: {}
# paths:
# - '**/ansible-navigator.yaml'
# - '**/execution-environment.yml'
env:
# Set this to the public IP or hostname of your registry,
# whichever you use to reach it from your desktop/laptop
FORGEJO_HOST: git.gamezonline.me
CONTAINER_NAME: radius
jobs: jobs:
docker: build-image:
runs-on: JackOfAllTrades-x86 name: Build image
runs-on: debian-latest
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:
- name: Login to the registry - uses: actions/checkout@v3
uses: docker/login-action@v3 - name: Install Docker
with: run: |
registry: ${{ env.FORGEJO_HOST }} apt-get update
username: ${{ github.actor }} apt-get install -y ca-certificates curl gnupg
password: ${{ secrets.PACKAGE_TOKEN }} install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc
- name: Set up QEMU chmod a+r /etc/apt/keyrings/docker.asc
uses: docker/setup-qemu-action@v3 # Add the repository to Apt sources:
echo \
- name: Set up Docker Buildx "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian \
uses: docker/setup-buildx-action@v3 $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
tee /etc/apt/sources.list.d/docker.list > /dev/null
- name: Build and push apt-get update
uses: docker/build-push-action@v6 apt-get install -y docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
with: - name: Build image
context: context run: |
push: true docker build -t radius .
provenance: false
platforms: linux/amd64, linux/arm64
tags: ${{ env.FORGEJO_HOST }}/${{ github.actor }}/${{ env.CONTAINER_NAME }}:latest