mirror of
https://codeberg.org/Codeberg/pages-server.git
synced 2025-04-19 12:54:24 +02:00
add image tags
This commit is contained in:
parent
c14c5474b6
commit
f1662fa9c4
2 changed files with 30 additions and 26 deletions
|
@ -1,6 +1,6 @@
|
|||
when:
|
||||
branch: main
|
||||
event: ["push", "pull_request"]
|
||||
event: ['push', 'pull_request']
|
||||
|
||||
steps:
|
||||
# use vendor to cache dependencies
|
||||
|
@ -9,20 +9,6 @@ steps:
|
|||
commands:
|
||||
- go mod vendor
|
||||
|
||||
lint:
|
||||
image: golangci/golangci-lint:latest
|
||||
depends_on: vendor
|
||||
pull: true
|
||||
commands:
|
||||
- go version
|
||||
- go install mvdan.cc/gofumpt@latest
|
||||
- "[ $(gofumpt -extra -l . | wc -l) != 0 ] && { echo 'code not formated'; exit 1; }"
|
||||
- golangci-lint run --timeout 5m --build-tags integration
|
||||
|
||||
editor-config:
|
||||
depends_on: []
|
||||
image: mstruebing/editorconfig-checker
|
||||
|
||||
build:
|
||||
depends_on: vendor
|
||||
image: codeberg.org/6543/docker-images/golang_just
|
||||
|
@ -30,17 +16,17 @@ steps:
|
|||
- go version
|
||||
- just build
|
||||
when:
|
||||
event: ["pull_request", "push"]
|
||||
event: ['pull_request', 'push']
|
||||
|
||||
docker-dryrun:
|
||||
depends_on: vendor
|
||||
image: plugins/kaniko
|
||||
image: plugins/kaniko:1.8.8
|
||||
settings:
|
||||
dockerfile: Dockerfile
|
||||
no_push: true
|
||||
tags: latest
|
||||
when:
|
||||
event: ["pull_request", "push"]
|
||||
event: ['pull_request', 'push']
|
||||
path: Dockerfile
|
||||
|
||||
build-tag:
|
||||
|
@ -50,7 +36,7 @@ steps:
|
|||
- go version
|
||||
- just build-tag ${CI_COMMIT_TAG##v}
|
||||
when:
|
||||
event: ["tag"]
|
||||
event: ['tag']
|
||||
|
||||
test:
|
||||
depends_on: build
|
||||
|
@ -71,7 +57,7 @@ steps:
|
|||
|
||||
release:
|
||||
depends_on: build
|
||||
image: plugins/gitea-release
|
||||
image: plugins/gitea-release:0.3.1
|
||||
settings:
|
||||
base_url: https://codeberg.org
|
||||
file_exists: overwrite
|
||||
|
@ -84,11 +70,11 @@ steps:
|
|||
- CI_BUILD_EVENT=${CI_BUILD_EVENT}
|
||||
- CI_COMMIT_REF=${CI_COMMIT_REF}
|
||||
when:
|
||||
event: ["tag"]
|
||||
event: ['tag']
|
||||
|
||||
docker-next:
|
||||
depends_on: vendor
|
||||
image: plugins/kaniko
|
||||
image: plugins/kaniko:1.8.8
|
||||
settings:
|
||||
registry: codeberg.org
|
||||
dockerfile: Dockerfile
|
||||
|
@ -99,20 +85,20 @@ steps:
|
|||
password:
|
||||
from_secret: bot_token
|
||||
when:
|
||||
event: ["push"]
|
||||
event: ['push']
|
||||
branch: ${CI_REPO_DEFAULT_BRANCH}
|
||||
|
||||
docker-tag:
|
||||
depends_on: vendor
|
||||
image: plugins/kaniko
|
||||
image: plugins/kaniko:1.8.8
|
||||
settings:
|
||||
registry: codeberg.org
|
||||
dockerfile: Dockerfile
|
||||
repo: codeberg.org/codeberg/pages-server
|
||||
tags: [latest, "${CI_COMMIT_TAG}"]
|
||||
tags: [latest, '${CI_COMMIT_TAG}']
|
||||
username:
|
||||
from_secret: bot_user
|
||||
password:
|
||||
from_secret: bot_token
|
||||
when:
|
||||
event: ["tag"]
|
||||
event: ['tag']
|
18
.woodpecker/lint.yml
Normal file
18
.woodpecker/lint.yml
Normal file
|
@ -0,0 +1,18 @@
|
|||
when:
|
||||
branch: main
|
||||
event: ['push', 'pull_request']
|
||||
|
||||
steps:
|
||||
lint:
|
||||
image: golangci/golangci-lint:v1.57.2
|
||||
depends_on: vendor
|
||||
pull: true
|
||||
commands:
|
||||
- go version
|
||||
- go install mvdan.cc/gofumpt@latest
|
||||
- "[ $(gofumpt -extra -l . | wc -l) != 0 ] && { echo 'code not formated'; exit 1; }"
|
||||
- golangci-lint run --timeout 5m --build-tags integration
|
||||
|
||||
editor-config:
|
||||
depends_on: []
|
||||
image: mstruebing/editorconfig-checker:2.7.2
|
Loading…
Add table
Reference in a new issue