Added Tagged Build for Docker (#7)

Reviewed-on: #7
This commit is contained in:
Phil 2024-04-20 21:17:04 +02:00
parent 0b2793d5ab
commit ed2937ee56
2 changed files with 33 additions and 2 deletions

View file

@ -26,7 +26,7 @@ steps:
when: when:
- event: push - event: push
branch: main branch: main
- event: [tag, deployment, release, cron] - event: cron
services: services:
docker: docker:
@ -37,7 +37,7 @@ services:
when: when:
- event: push - event: push
branch: main branch: main
- event: [tag, deployment, release, cron] - event: cron
depends_on: depends_on:
- 1-check - 1-check

View file

@ -0,0 +1,31 @@
steps:
- name: build-docker-tg-linux-amd64/arm64/armv6
image: woodpeckerci/plugin-docker-buildx:3
environment:
- DOCKER_HOST=tcp://docker:2376
settings:
platforms: linux/amd64,linux/arm/v6,linux/arm64/v8
repo: git.hackmi.ch/phil/goshorly
registry: git.hackmi.ch
tags: ${CI_COMMIT_TAG}
username:
from_secret: reg-user
password:
from_secret: reg-pass
build_args:
- CI_COMMIT_BRANCH=${CI_COMMIT_BRANCH}
- CI_COMMIT_SHORT_SHA=${CI_COMMIT_SHA:0:10}
- CI_COMMIT_TAG=${CI_COMMIT_TAG}
services:
docker:
image: docker:24-dind
commands:
- dockerd --tls=false --host=tcp://0.0.0.0:2376
privileged: true
depends_on:
- 1-check
when:
- event: tag