Updated pipeline.yml
This commit is contained in:
parent
2a87970cb3
commit
948ef0c179
@ -1,9 +1,19 @@
|
|||||||
pipeline:
|
pipeline:
|
||||||
generate_tag:
|
generate_docker_tag:
|
||||||
image: golang
|
image: golang
|
||||||
commands:
|
commands:
|
||||||
- echo -n "${CI_COMMIT_BRANCH//\//-}-${CI_COMMIT_SHA:0:8}, latest" > .tags
|
- echo -n "${CI_COMMIT_BRANCH//\//-}-${CI_COMMIT_SHA:0:8}, latest" > .tags
|
||||||
|
when:
|
||||||
|
event: push
|
||||||
|
|
||||||
|
generate_docker_tag_pr:
|
||||||
|
image: golang
|
||||||
|
commands:
|
||||||
|
- echo -n "pr-${CI_COMMIT_SHA:0:8}, pr" > .tags
|
||||||
|
when:
|
||||||
|
event: pull_request
|
||||||
|
|
||||||
|
# -------------------------------------- API --------------------------------------
|
||||||
build_api:
|
build_api:
|
||||||
image: woodpeckerci/plugin-docker-buildx
|
image: woodpeckerci/plugin-docker-buildx
|
||||||
settings:
|
settings:
|
||||||
@ -19,6 +29,7 @@ pipeline:
|
|||||||
platforms: linux/amd64
|
platforms: linux/amd64
|
||||||
when:
|
when:
|
||||||
path: "api/*"
|
path: "api/*"
|
||||||
|
event: push
|
||||||
|
|
||||||
deploy_api:
|
deploy_api:
|
||||||
image: appleboy/drone-ssh
|
image: appleboy/drone-ssh
|
||||||
@ -34,7 +45,10 @@ pipeline:
|
|||||||
- /opt/docker/TelegramAktienBot/deploy_api.sh
|
- /opt/docker/TelegramAktienBot/deploy_api.sh
|
||||||
when:
|
when:
|
||||||
path: "api/*"
|
path: "api/*"
|
||||||
|
event: push
|
||||||
|
|
||||||
|
|
||||||
|
# -------------------------------------- Bot --------------------------------------
|
||||||
build_bot:
|
build_bot:
|
||||||
image: woodpeckerci/plugin-docker-buildx
|
image: woodpeckerci/plugin-docker-buildx
|
||||||
settings:
|
settings:
|
||||||
@ -66,6 +80,8 @@ pipeline:
|
|||||||
when:
|
when:
|
||||||
path: "telegram_bot/*"
|
path: "telegram_bot/*"
|
||||||
|
|
||||||
|
|
||||||
|
# -------------------------------------- Frontend --------------------------------------
|
||||||
build_frontend:
|
build_frontend:
|
||||||
image: woodpeckerci/plugin-docker-buildx
|
image: woodpeckerci/plugin-docker-buildx
|
||||||
settings:
|
settings:
|
||||||
@ -97,8 +113,4 @@ pipeline:
|
|||||||
when:
|
when:
|
||||||
path: "frontend/*"
|
path: "frontend/*"
|
||||||
|
|
||||||
when:
|
|
||||||
event: [ push ]
|
|
||||||
|
|
||||||
|
|
||||||
branches: main
|
branches: main
|
||||||
|
Loading…
Reference in New Issue
Block a user