dind-bash/.forgejo/workflows/build.yml

30 lines
1.3 KiB
YAML
Raw Normal View History

2023-11-16 17:38:37 +00:00
name: 'Build Custom docker:dind image'
author: 'Neshura'
on: [push]
jobs:
build-container:
2023-11-16 17:43:19 +00:00
runs-on: docker
2023-11-16 17:38:37 +00:00
steps:
2023-11-16 17:46:46 +00:00
-
name: Prepare Container Environment
2023-11-16 17:49:18 +00:00
run: |
install -m 0755 -d /etc/apt/keyrings; \
2023-11-16 17:50:06 +00:00
curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg; \
2023-11-16 17:49:18 +00:00
chmod a+r /etc/apt/keyrings/docker.gpg; \
echo \
"deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian \
"$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | \
2023-11-16 17:50:06 +00:00
tee /etc/apt/sources.list.d/docker.list > /dev/null; \
2023-11-16 17:49:18 +00:00
apt-get update; \
apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
2023-11-16 17:38:37 +00:00
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Push to Package Registry
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: https://forgejo.neshweb.net/Neshura/docker-dind-bash:latest