fix triggers

This commit is contained in:
pat-s 2024-04-27 22:51:52 +02:00
parent 8a0c60ab97
commit 3ceef03163
No known key found for this signature in database
GPG key ID: 3C6318841EF78925
2 changed files with 40 additions and 12 deletions

View file

@ -5,6 +5,9 @@ when:
- ${CI_REPO_DEFAULT_BRANCH} - ${CI_REPO_DEFAULT_BRANCH}
- renovate/* - renovate/*
depends_on:
- lint
steps: steps:
# use vendor to cache dependencies # use vendor to cache dependencies
vendor: vendor:
@ -19,7 +22,10 @@ steps:
- go version - go version
- just build - just build
when: when:
event: ["pull_request", "push"] - event: [push, pull_request]
branch:
- ${CI_REPO_DEFAULT_BRANCH}
- renovate/*
docker-dryrun: docker-dryrun:
depends_on: vendor depends_on: vendor
@ -29,8 +35,11 @@ steps:
no_push: true no_push: true
tags: latest tags: latest
when: when:
event: ["pull_request", "push"] - event: [push, pull_request]
path: Dockerfile branch:
- ${CI_REPO_DEFAULT_BRANCH}
- renovate/*
path: Dockerfile
build-tag: build-tag:
depends_on: vendor depends_on: vendor
@ -39,13 +48,19 @@ steps:
- go version - go version
- just build-tag ${CI_COMMIT_TAG##v} - just build-tag ${CI_COMMIT_TAG##v}
when: when:
event: ["tag"] - event: ["tag"]
branch:
- ${CI_REPO_DEFAULT_BRANCH}
test: test:
depends_on: build depends_on: build
image: codeberg.org/6543/docker-images/golang_just image: codeberg.org/6543/docker-images/golang_just
commands: commands:
- just test - just test
when:
- event: pull_request
- event: push
branch: renovate/*
integration-tests: integration-tests:
depends_on: build depends_on: build
@ -57,6 +72,10 @@ steps:
- PAGES_DOMAIN=localhost.mock.directory - PAGES_DOMAIN=localhost.mock.directory
- RAW_DOMAIN=raw.localhost.mock.directory - RAW_DOMAIN=raw.localhost.mock.directory
- PORT=4430 - PORT=4430
when:
- event: pull_request
- event: push
branch: renovate/*
release: release:
depends_on: build depends_on: build
@ -73,7 +92,9 @@ steps:
- CI_BUILD_EVENT=${CI_BUILD_EVENT} - CI_BUILD_EVENT=${CI_BUILD_EVENT}
- CI_COMMIT_REF=${CI_COMMIT_REF} - CI_COMMIT_REF=${CI_COMMIT_REF}
when: when:
event: ["tag"] - event: ["tag"]
branch:
- ${CI_REPO_DEFAULT_BRANCH}
docker-next: docker-next:
depends_on: vendor depends_on: vendor
@ -88,8 +109,8 @@ steps:
password: password:
from_secret: bot_token from_secret: bot_token
when: when:
event: ["push"] - event: ["push"]
branch: ${CI_REPO_DEFAULT_BRANCH} branch: ${CI_REPO_DEFAULT_BRANCH}
docker-tag: docker-tag:
depends_on: vendor depends_on: vendor
@ -104,4 +125,5 @@ steps:
password: password:
from_secret: bot_token from_secret: bot_token
when: when:
event: ["tag"] - event: ["push"]
branch: ${CI_REPO_DEFAULT_BRANCH}

View file

@ -1,9 +1,7 @@
when: when:
- event: [pull_request, tag, cron] - event: pull_request
- event: push - event: push
branch: branch: renovate/*
- ${CI_REPO_DEFAULT_BRANCH}
- renovate/*
steps: steps:
lint: lint:
@ -15,7 +13,15 @@ steps:
- go install mvdan.cc/gofumpt@latest - go install mvdan.cc/gofumpt@latest
- "[ $(gofumpt -extra -l . | wc -l) != 0 ] && { echo 'code not formated'; exit 1; }" - "[ $(gofumpt -extra -l . | wc -l) != 0 ] && { echo 'code not formated'; exit 1; }"
- golangci-lint run --timeout 5m --build-tags integration - golangci-lint run --timeout 5m --build-tags integration
when:
- event: pull_request
- event: push
branch: renovate/*
editor-config: editor-config:
depends_on: [] depends_on: []
image: mstruebing/editorconfig-checker:2.7.2 image: mstruebing/editorconfig-checker:2.7.2
when:
- event: pull_request
- event: push
branch: renovate/*