Adora Laura Kalb
5d58ae8411
All checks were successful
ci/woodpecker/push/docker-deploy Pipeline was successful
79 lines
2.1 KiB
YAML
79 lines
2.1 KiB
YAML
variables:
|
|
- &docker_repo 'adoralaura/humble-bot'
|
|
- &docker_registry 'https://index.docker.io/v1/'
|
|
- &docker_username 'adoralaura'
|
|
- &docker_platforms_testing 'linux/arm64/v8,linux/amd64'
|
|
- &docker_platforms_release 'linux/arm/v7,linux/arm64/v8,linux/amd64'
|
|
- &docker_dockerfile 'Dockerfile'
|
|
|
|
steps:
|
|
- name: go-lint
|
|
image: golangci/golangci-lint
|
|
commands:
|
|
- golangci-lint run
|
|
when:
|
|
event: ["push", "pull_request", "manual"]
|
|
|
|
# - name: docker-deploy-push
|
|
# depends_on:
|
|
# - go-lint
|
|
# when:
|
|
# - event: push
|
|
# branch: main
|
|
# image: woodpeckerci/plugin-docker-buildx
|
|
# settings:
|
|
# dockerfile: Dockerfile
|
|
# platforms: linux/arm/v7,linux/arm64/v8,linux/amd64
|
|
# repo: docker_repo
|
|
# registry: *docker_registry
|
|
# tags: latest
|
|
# username: adoralaura
|
|
# password:
|
|
# from_secret: dockerhub_token
|
|
|
|
- name: docker-deploy-tag
|
|
when:
|
|
- event: tag
|
|
image: woodpeckerci/plugin-docker-buildx
|
|
settings:
|
|
dockerfile: *docker_dockerfile
|
|
platforms: *docker_platforms_release
|
|
repo: *docker_repo
|
|
registry: *docker_registry
|
|
auto_tag: true
|
|
username: *docker_username
|
|
password:
|
|
from_secret: dockerhub_token
|
|
|
|
- name: docker-deploy-unstable
|
|
depends_on:
|
|
- go-lint
|
|
when:
|
|
- event: push
|
|
branch: main
|
|
image: woodpeckerci/plugin-docker-buildx
|
|
settings:
|
|
dockerfile: *docker_dockerfile
|
|
platforms: *docker_platforms_testing
|
|
repo: *docker_repo
|
|
registry: *docker_registry
|
|
tags: unstable
|
|
username: *docker_username
|
|
password:
|
|
from_secret: dockerhub_token
|
|
|
|
- name: docker-deploy-pr
|
|
depends_on:
|
|
- go-lint
|
|
when:
|
|
- event: pull_request
|
|
image: woodpeckerci/plugin-docker-buildx
|
|
settings:
|
|
dockerfile: *docker_dockerfile
|
|
platforms: *docker_platforms_testing
|
|
repo: *docker_repo
|
|
registry: *docker_registry
|
|
tag: pull-${CI_COMMIT_PULL_REQUEST}
|
|
username: *docker_username
|
|
password:
|
|
from_secret: dockerhub_token
|