mirror of
https://codeberg.org/Codeberg/pages-server.git
synced 2024-11-18 10:29:43 +00:00
improve pipeline config (#371)
Reviewed-on: https://codeberg.org/Codeberg/pages-server/pulls/371 Co-authored-by: crapStone <me@crapstone.dev> Co-committed-by: crapStone <me@crapstone.dev>
This commit is contained in:
parent
abbebbbcee
commit
68825a1727
2 changed files with 8 additions and 41 deletions
|
@ -1,9 +1,6 @@
|
||||||
when:
|
when:
|
||||||
- event: [pull_request, tag, cron]
|
- event: [push, pull_request, tag, cron]
|
||||||
- event: push
|
branch: ${CI_REPO_DEFAULT_BRANCH}
|
||||||
branch:
|
|
||||||
- ${CI_REPO_DEFAULT_BRANCH}
|
|
||||||
- renovate/*
|
|
||||||
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- lint
|
- lint
|
||||||
|
@ -24,9 +21,6 @@ steps:
|
||||||
- just build
|
- just build
|
||||||
when:
|
when:
|
||||||
- event: [push, pull_request]
|
- event: [push, pull_request]
|
||||||
branch:
|
|
||||||
- ${CI_REPO_DEFAULT_BRANCH}
|
|
||||||
- renovate/*
|
|
||||||
|
|
||||||
docker-dryrun:
|
docker-dryrun:
|
||||||
depends_on: vendor
|
depends_on: vendor
|
||||||
|
@ -38,9 +32,6 @@ steps:
|
||||||
tags: latest
|
tags: latest
|
||||||
when:
|
when:
|
||||||
- event: [push, pull_request]
|
- event: [push, pull_request]
|
||||||
branch:
|
|
||||||
- ${CI_REPO_DEFAULT_BRANCH}
|
|
||||||
- renovate/*
|
|
||||||
path: Dockerfile
|
path: Dockerfile
|
||||||
|
|
||||||
build-tag:
|
build-tag:
|
||||||
|
@ -51,9 +42,7 @@ 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
|
||||||
|
@ -62,9 +51,7 @@ steps:
|
||||||
commands:
|
commands:
|
||||||
- just test
|
- just test
|
||||||
when:
|
when:
|
||||||
- event: pull_request
|
- event: [push, pull_request]
|
||||||
- event: push
|
|
||||||
branch: renovate/*
|
|
||||||
|
|
||||||
integration-tests:
|
integration-tests:
|
||||||
depends_on: build
|
depends_on: build
|
||||||
|
@ -78,9 +65,7 @@ steps:
|
||||||
- RAW_DOMAIN=raw.localhost.mock.directory
|
- RAW_DOMAIN=raw.localhost.mock.directory
|
||||||
- PORT=4430
|
- PORT=4430
|
||||||
when:
|
when:
|
||||||
- event: pull_request
|
- event: [push, pull_request]
|
||||||
- event: push
|
|
||||||
branch: renovate/*
|
|
||||||
|
|
||||||
release:
|
release:
|
||||||
depends_on: build
|
depends_on: build
|
||||||
|
@ -92,9 +77,7 @@ steps:
|
||||||
api_key:
|
api_key:
|
||||||
from_secret: bot_token
|
from_secret: bot_token
|
||||||
when:
|
when:
|
||||||
- event: ['tag']
|
- event: [tag]
|
||||||
branch:
|
|
||||||
- ${CI_REPO_DEFAULT_BRANCH}
|
|
||||||
|
|
||||||
docker-next:
|
docker-next:
|
||||||
depends_on: vendor
|
depends_on: vendor
|
||||||
|
@ -110,8 +93,7 @@ steps:
|
||||||
password:
|
password:
|
||||||
from_secret: bot_token
|
from_secret: bot_token
|
||||||
when:
|
when:
|
||||||
- event: ['push']
|
- event: [push]
|
||||||
branch: ${CI_REPO_DEFAULT_BRANCH}
|
|
||||||
|
|
||||||
'Publish PR image':
|
'Publish PR image':
|
||||||
image: woodpeckerci/plugin-docker-buildx:4.2.0
|
image: woodpeckerci/plugin-docker-buildx:4.2.0
|
||||||
|
@ -144,5 +126,4 @@ steps:
|
||||||
password:
|
password:
|
||||||
from_secret: bot_token
|
from_secret: bot_token
|
||||||
when:
|
when:
|
||||||
- event: ['push']
|
- event: [push]
|
||||||
branch: ${CI_REPO_DEFAULT_BRANCH}
|
|
||||||
|
|
|
@ -1,9 +1,7 @@
|
||||||
when:
|
when:
|
||||||
- event: pull_request
|
- event: pull_request
|
||||||
- event: push
|
|
||||||
branch:
|
branch:
|
||||||
- ${CI_REPO_DEFAULT_BRANCH}
|
- ${CI_REPO_DEFAULT_BRANCH}
|
||||||
- renovate/**
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
lint:
|
lint:
|
||||||
|
@ -14,28 +12,16 @@ 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:v3.0.3
|
image: mstruebing/editorconfig-checker:v3.0.3
|
||||||
when:
|
|
||||||
- event: pull_request
|
|
||||||
- event: push
|
|
||||||
branch: renovate/*
|
|
||||||
|
|
||||||
yamllint:
|
yamllint:
|
||||||
image: pipelinecomponents/yamllint:0.31.3
|
image: pipelinecomponents/yamllint:0.31.3
|
||||||
depends_on: []
|
depends_on: []
|
||||||
commands:
|
commands:
|
||||||
- yamllint .
|
- yamllint .
|
||||||
when:
|
|
||||||
- event: pull_request
|
|
||||||
- event: push
|
|
||||||
branch: renovate/*
|
|
||||||
|
|
||||||
prettier:
|
prettier:
|
||||||
image: docker.io/woodpeckerci/plugin-prettier:0.1.0
|
image: docker.io/woodpeckerci/plugin-prettier:0.1.0
|
||||||
|
|
Loading…
Reference in a new issue