separate build and push
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
n0vember 2024-03-12 01:57:59 +01:00
parent ffb95230d2
commit d10b29efbf
No known key found for this signature in database
GPG Key ID: 8ECF21687C8F8994

View File

@ -34,13 +34,26 @@ steps:
path: /var/run path: /var/run
environment: environment:
REGISTRY: git.half-9.net REGISTRY: git.half-9.net
USER: n0vember
OWNER: containers OWNER: containers
IMAGE: pihole-exporter IMAGE: pihole-exporter
TAG: latest TAG: latest
commands:
- docker build -t $REGISTRY/$OWNER/$IMAGE:$TAG .
- name: container publish
image: registry.gitlab.com/role_unit/role_unit_containers:build
privileged: true
volumes:
- name: dockersock
path: /var/run
environment:
REGISTRY: git.half-9.net
OWNER: containers
IMAGE: pihole-exporter
TAG: latest
USER: n0vember
TOKEN: TOKEN:
from_secret: registry_token from_secret: registry_token
commands: commands:
- docker login --username="$USER" --password="$TOKEN" $REGISTRY - docker login --username="$USER" --password="$TOKEN" $REGISTRY
- docker build -t $REGISTRY/$OWNER/$IMAGE:$TAG .
- docker push $REGISTRY/$OWNER/$IMAGE:$TAG - docker push $REGISTRY/$OWNER/$IMAGE:$TAG