Update .forgejo/workflows/docker-build.yml

This commit is contained in:
2025-06-01 22:55:19 -05:00
parent 0fe51506bd
commit 560334e193
+30 -38
View File
@@ -1,48 +1,40 @@
name: Docker Build single node name: Docker Build single node
on: 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:
# 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:
build-image: docker:
name: Build image runs-on: ubuntu-latest
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: Install Docker name: Login to Docker Hub
run: | uses: docker/login-action@v3
apt-get update with:
apt-get install -y ca-certificates curl gnupg registry: ${{ env.FORGEJO_HOST }}
install -m 0755 -d /etc/apt/keyrings username: ${{ github.actor }}
curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc password: ${{ secrets.PACKAGE_TOKEN }}
chmod a+r /etc/apt/keyrings/docker.asc -
# Add the repository to Apt sources: name: Set up QEMU
echo \ uses: docker/setup-qemu-action@v3
"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" | \ name: Set up Docker Buildx
tee /etc/apt/sources.list.d/docker.list > /dev/null uses: docker/setup-buildx-action@v3
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
with: with:
push: true push: true
provenance: false
platforms: linux/amd64, linux/arm64
tags: ${{ env.FORGEJO_HOST }}/${{ github.actor }}/${{ env.CONTAINER_NAME }}:latest tags: ${{ env.FORGEJO_HOST }}/${{ github.actor }}/${{ env.CONTAINER_NAME }}:latest
run: |
docker build -t radius .