Update .forgejo/workflows/docker-build.yml
This commit is contained in:
@@ -16,24 +16,39 @@ env:
|
|||||||
CONTAINER_NAME: radius
|
CONTAINER_NAME: radius
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
docker:
|
build-image:
|
||||||
runs-on: docker-cli
|
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:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
- name: Set up Docker Buildx
|
- name: Install Docker
|
||||||
uses: docker/setup-buildx-action@v3
|
run: |
|
||||||
|
apt-get update
|
||||||
- name: Login to Docker Hub
|
apt-get install -y ca-certificates curl gnupg
|
||||||
uses: docker/login-action@v3
|
install -m 0755 -d /etc/apt/keyrings
|
||||||
with:
|
curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc
|
||||||
registry: ${{ env.FORGEJO_HOST }}
|
chmod a+r /etc/apt/keyrings/docker.asc
|
||||||
username: ${{ github.actor }}
|
# Add the repository to Apt sources:
|
||||||
password: ${{ secrets.PACKAGE_TOKEN }}
|
echo \
|
||||||
|
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian \
|
||||||
- name: Set up QEMU
|
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
|
||||||
uses: docker/setup-qemu-action@v3
|
tee /etc/apt/sources.list.d/docker.list > /dev/null
|
||||||
with:
|
apt-get update
|
||||||
platforms: 'amd64,arm64'
|
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
|
||||||
@@ -42,4 +57,5 @@ jobs:
|
|||||||
file: ./Dockerfile
|
file: ./Dockerfile
|
||||||
platforms: linux/amd64,linux/arm64
|
platforms: linux/amd64,linux/arm64
|
||||||
push: true
|
push: true
|
||||||
|
provenance: false
|
||||||
tags: ${{ env.FORGEJO_HOST }}/${{ github.actor }}/${{ env.CONTAINER_NAME }}:latest
|
tags: ${{ env.FORGEJO_HOST }}/${{ github.actor }}/${{ env.CONTAINER_NAME }}:latest
|
||||||
Reference in New Issue
Block a user