build: 👷 add "only" rules to stages

Added so build only runs on pushes and merge requests and docker runs on tags
This commit is contained in:
Axel Olausson Holtenäs 2023-10-01 17:03:21 +02:00
parent 1ef4f6cbb1
commit 56148a1d87

View file

@ -24,6 +24,9 @@ build:
artifacts:
paths:
- build-artifacts.tar.gz
only:
- merge_requests
- pushes
docker:
stage: docker
@ -51,3 +54,5 @@ docker:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker build -t $CI_REGISTRY/zyner/xyter/bot:latest .
- docker push $CI_REGISTRY/zyner/xyter/bot:latest
only:
- tags