fuelprice-exporter/.woodpecker/docker-deploy.yml

44 lines
1.1 KiB
YAML
Raw Permalink Normal View History

2024-07-11 10:37:53 +02:00
when:
- event: [pull_request, tag]
# Change this when using template
variables:
- &DOCKER_USERNAME 'adoralaura'
- &DOCKER_REPOSITORY 'adoralaura/template-exporter'
- &DOCKER_REGISTRY 'https://index.docker.io/v1/'
# Necessary Secrets:
# DOCKERHUB_TOKEN: https://hub.docker.com/settings/security -> New Access-Token -> Read, Write
steps:
docker-deploy-pr:
when:
- event: pull_request
image: woodpeckerci/plugin-docker-buildx
settings:
dockerfile: Dockerfile
platforms: linux/arm/v7,linux/arm64/v8,linux/amd64
repo: *DOCKER_REPOSITORY
registry: *DOCKER_REGISTRY
tag: pr-${CI_COMMIT_PULL_REQUEST}
username: *DOCKER_USERNAME
password:
from_secret: dockerhub_token
docker-deploy-tag:
when:
event: tag
image: woodpeckerci/plugin-docker-buildx
settings:
dockerfile: Dockerfile
platforms: linux/arm/v7,linux/arm64/v8,linux/amd64
repo: *DOCKER_REPOSITORY
registry: *DOCKER_REGISTRY
auto_tag: true
username: *DOCKER_USERNAME
password:
from_secret: dockerhub_token