Skip to content
Snippets Groups Projects
Commit 94f36703 authored by schnarkus's avatar schnarkus
Browse files

only trigger pipeline on merge requests or pushes to main/stable branches

parent 0728f8ae
No related branches found
No related tags found
No related merge requests found
Pipeline #59208 passed
---
workflow:
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event" || ($CI_PIPELINE_SOURCE == "push" && ($CI_COMMIT_BRANCH == "main" || $CI_COMMIT_BRANCH == "stable"))
when: always
- when: never
variables:
version: 0.0.$CI_PIPELINE_IID
stages:
......@@ -13,6 +18,9 @@ test_job:
- go test -race -v ./...
build_job:
stage: build
rules:
- if: $CI_COMMIT_REF_NAME =~ /stable/
when: always
image: public.ecr.aws/docker/library/golang:1.21
parallel:
matrix:
......@@ -26,6 +34,9 @@ build_job:
expire_in: 5 min
publish_job:
stage: publish
rules:
- if: $CI_COMMIT_REF_NAME =~ /stable/
when: always
image: public.ecr.aws/docker/library/alpine:latest
tags:
- docker-privileged
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment