mirror of
https://codeberg.org/Codeberg/pages-server.git
synced 2024-11-18 10:29:43 +00:00
Address CI warnings (#312)
Reviewed-on: https://codeberg.org/Codeberg/pages-server/pulls/312 Reviewed-by: crapStone <codeberg@crapstone.dev> Co-authored-by: pat-s <patrick.schratz@gmail.com> Co-committed-by: pat-s <patrick.schratz@gmail.com>
This commit is contained in:
parent
019e85a0d0
commit
7092883ebe
1 changed files with 22 additions and 18 deletions
|
@ -1,5 +1,6 @@
|
||||||
when:
|
when:
|
||||||
branch: main
|
branch: main
|
||||||
|
event: ["push", "pull_request"]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
# use vendor to cache dependencies
|
# use vendor to cache dependencies
|
||||||
|
@ -10,7 +11,7 @@ steps:
|
||||||
|
|
||||||
lint:
|
lint:
|
||||||
image: golangci/golangci-lint:latest
|
image: golangci/golangci-lint:latest
|
||||||
group: compliant
|
depends_on: vendor
|
||||||
pull: true
|
pull: true
|
||||||
commands:
|
commands:
|
||||||
- go version
|
- go version
|
||||||
|
@ -19,46 +20,46 @@ steps:
|
||||||
- golangci-lint run --timeout 5m --build-tags integration
|
- golangci-lint run --timeout 5m --build-tags integration
|
||||||
|
|
||||||
editor-config:
|
editor-config:
|
||||||
group: compliant
|
depends_on: []
|
||||||
image: mstruebing/editorconfig-checker
|
image: mstruebing/editorconfig-checker
|
||||||
|
|
||||||
build:
|
build:
|
||||||
group: compliant
|
depends_on: vendor
|
||||||
image: codeberg.org/6543/docker-images/golang_just
|
image: codeberg.org/6543/docker-images/golang_just
|
||||||
commands:
|
commands:
|
||||||
- go version
|
- go version
|
||||||
- just build
|
- just build
|
||||||
when:
|
when:
|
||||||
event: [ "pull_request", "push" ]
|
event: ["pull_request", "push"]
|
||||||
|
|
||||||
docker-dryrun:
|
docker-dryrun:
|
||||||
group: compliant
|
depends_on: vendor
|
||||||
image: plugins/kaniko
|
image: plugins/kaniko
|
||||||
settings:
|
settings:
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
no_push: true
|
no_push: true
|
||||||
tags: latest
|
tags: latest
|
||||||
when:
|
when:
|
||||||
event: [ "pull_request", "push" ]
|
event: ["pull_request", "push"]
|
||||||
path: Dockerfile
|
path: Dockerfile
|
||||||
|
|
||||||
build-tag:
|
build-tag:
|
||||||
group: compliant
|
depends_on: vendor
|
||||||
image: codeberg.org/6543/docker-images/golang_just
|
image: codeberg.org/6543/docker-images/golang_just
|
||||||
commands:
|
commands:
|
||||||
- go version
|
- go version
|
||||||
- just build-tag ${CI_COMMIT_TAG##v}
|
- just build-tag ${CI_COMMIT_TAG##v}
|
||||||
when:
|
when:
|
||||||
event: [ "tag" ]
|
event: ["tag"]
|
||||||
|
|
||||||
test:
|
test:
|
||||||
group: test
|
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
|
||||||
|
|
||||||
integration-tests:
|
integration-tests:
|
||||||
group: test
|
depends_on: build
|
||||||
image: codeberg.org/6543/docker-images/golang_just
|
image: codeberg.org/6543/docker-images/golang_just
|
||||||
commands:
|
commands:
|
||||||
- just integration
|
- just integration
|
||||||
|
@ -69,6 +70,7 @@ steps:
|
||||||
- PORT=4430
|
- PORT=4430
|
||||||
|
|
||||||
release:
|
release:
|
||||||
|
depends_on: build
|
||||||
image: plugins/gitea-release
|
image: plugins/gitea-release
|
||||||
settings:
|
settings:
|
||||||
base_url: https://codeberg.org
|
base_url: https://codeberg.org
|
||||||
|
@ -77,14 +79,15 @@ steps:
|
||||||
api_key:
|
api_key:
|
||||||
from_secret: bot_token
|
from_secret: bot_token
|
||||||
environment:
|
environment:
|
||||||
- DRONE_REPO_OWNER=${CI_REPO_OWNER}
|
- CI_REPO_OWNER=${CI_REPO_OWNER}
|
||||||
- DRONE_REPO_NAME=${CI_REPO_NAME}
|
- CI_REPO_NAME=${CI_REPO_NAME}
|
||||||
- DRONE_BUILD_EVENT=${CI_BUILD_EVENT}
|
- CI_BUILD_EVENT=${CI_BUILD_EVENT}
|
||||||
- DRONE_COMMIT_REF=${CI_COMMIT_REF}
|
- CI_COMMIT_REF=${CI_COMMIT_REF}
|
||||||
when:
|
when:
|
||||||
event: [ "tag" ]
|
event: ["tag"]
|
||||||
|
|
||||||
docker-next:
|
docker-next:
|
||||||
|
depends_on: vendor
|
||||||
image: plugins/kaniko
|
image: plugins/kaniko
|
||||||
settings:
|
settings:
|
||||||
registry: codeberg.org
|
registry: codeberg.org
|
||||||
|
@ -96,19 +99,20 @@ 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
|
||||||
image: plugins/kaniko
|
image: plugins/kaniko
|
||||||
settings:
|
settings:
|
||||||
registry: codeberg.org
|
registry: codeberg.org
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
repo: codeberg.org/codeberg/pages-server
|
repo: codeberg.org/codeberg/pages-server
|
||||||
tags: [ latest, "${CI_COMMIT_TAG}" ]
|
tags: [latest, "${CI_COMMIT_TAG}"]
|
||||||
username:
|
username:
|
||||||
from_secret: bot_user
|
from_secret: bot_user
|
||||||
password:
|
password:
|
||||||
from_secret: bot_token
|
from_secret: bot_token
|
||||||
when:
|
when:
|
||||||
event: [ "tag" ]
|
event: ["tag"]
|
||||||
|
|
Loading…
Reference in a new issue