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:
pat-s 2024-04-27 19:14:01 +00:00 committed by Patrick Schratz
parent 019e85a0d0
commit 7092883ebe

View file

@ -1,5 +1,6 @@
when:
branch: main
event: ["push", "pull_request"]
steps:
# use vendor to cache dependencies
@ -10,7 +11,7 @@ steps:
lint:
image: golangci/golangci-lint:latest
group: compliant
depends_on: vendor
pull: true
commands:
- go version
@ -19,46 +20,46 @@ steps:
- golangci-lint run --timeout 5m --build-tags integration
editor-config:
group: compliant
depends_on: []
image: mstruebing/editorconfig-checker
build:
group: compliant
depends_on: vendor
image: codeberg.org/6543/docker-images/golang_just
commands:
- go version
- just build
when:
event: [ "pull_request", "push" ]
event: ["pull_request", "push"]
docker-dryrun:
group: compliant
depends_on: vendor
image: plugins/kaniko
settings:
dockerfile: Dockerfile
no_push: true
tags: latest
when:
event: [ "pull_request", "push" ]
event: ["pull_request", "push"]
path: Dockerfile
build-tag:
group: compliant
depends_on: vendor
image: codeberg.org/6543/docker-images/golang_just
commands:
- go version
- just build-tag ${CI_COMMIT_TAG##v}
when:
event: [ "tag" ]
event: ["tag"]
test:
group: test
depends_on: build
image: codeberg.org/6543/docker-images/golang_just
commands:
- just test
integration-tests:
group: test
depends_on: build
image: codeberg.org/6543/docker-images/golang_just
commands:
- just integration
@ -69,6 +70,7 @@ steps:
- PORT=4430
release:
depends_on: build
image: plugins/gitea-release
settings:
base_url: https://codeberg.org
@ -77,14 +79,15 @@ steps:
api_key:
from_secret: bot_token
environment:
- DRONE_REPO_OWNER=${CI_REPO_OWNER}
- DRONE_REPO_NAME=${CI_REPO_NAME}
- DRONE_BUILD_EVENT=${CI_BUILD_EVENT}
- DRONE_COMMIT_REF=${CI_COMMIT_REF}
- CI_REPO_OWNER=${CI_REPO_OWNER}
- CI_REPO_NAME=${CI_REPO_NAME}
- 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
settings:
registry: codeberg.org
@ -96,19 +99,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
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"]