ci: make it more versatile
All checks were successful
ci/woodpecker/push/docker-deploy Pipeline was successful
All checks were successful
ci/woodpecker/push/docker-deploy Pipeline was successful
This commit is contained in:
parent
dec99bdced
commit
5d58ae8411
1 changed files with 36 additions and 12 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
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:
|
steps:
|
||||||
- name: go-lint
|
- name: go-lint
|
||||||
image: golangci/golangci-lint
|
image: golangci/golangci-lint
|
||||||
|
@ -16,8 +24,8 @@ steps:
|
||||||
# settings:
|
# settings:
|
||||||
# dockerfile: Dockerfile
|
# dockerfile: Dockerfile
|
||||||
# platforms: linux/arm/v7,linux/arm64/v8,linux/amd64
|
# platforms: linux/arm/v7,linux/arm64/v8,linux/amd64
|
||||||
# repo: adoralaura/humble-bot
|
# repo: docker_repo
|
||||||
# registry: https://index.docker.io/v1/
|
# registry: *docker_registry
|
||||||
# tags: latest
|
# tags: latest
|
||||||
# username: adoralaura
|
# username: adoralaura
|
||||||
# password:
|
# password:
|
||||||
|
@ -28,12 +36,12 @@ steps:
|
||||||
- event: tag
|
- event: tag
|
||||||
image: woodpeckerci/plugin-docker-buildx
|
image: woodpeckerci/plugin-docker-buildx
|
||||||
settings:
|
settings:
|
||||||
dockerfile: Dockerfile
|
dockerfile: *docker_dockerfile
|
||||||
platforms: linux/arm/v7,linux/arm64/v8,linux/amd64
|
platforms: *docker_platforms_release
|
||||||
repo: adoralaura/humble-bot
|
repo: *docker_repo
|
||||||
registry: https://index.docker.io/v1/
|
registry: *docker_registry
|
||||||
auto_tag: true
|
auto_tag: true
|
||||||
username: adoralaura
|
username: *docker_username
|
||||||
password:
|
password:
|
||||||
from_secret: dockerhub_token
|
from_secret: dockerhub_token
|
||||||
|
|
||||||
|
@ -45,11 +53,27 @@ steps:
|
||||||
branch: main
|
branch: main
|
||||||
image: woodpeckerci/plugin-docker-buildx
|
image: woodpeckerci/plugin-docker-buildx
|
||||||
settings:
|
settings:
|
||||||
dockerfile: Dockerfile
|
dockerfile: *docker_dockerfile
|
||||||
platforms: linux/arm64/v8,linux/amd64
|
platforms: *docker_platforms_testing
|
||||||
repo: adoralaura/humble-bot
|
repo: *docker_repo
|
||||||
registry: https://index.docker.io/v1/
|
registry: *docker_registry
|
||||||
tags: unstable
|
tags: unstable
|
||||||
username: adoralaura
|
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:
|
password:
|
||||||
from_secret: dockerhub_token
|
from_secret: dockerhub_token
|
||||||
|
|
Loading…
Reference in a new issue