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