From 7092883ebe08e4dcace543518b0a5a783bed5d6c Mon Sep 17 00:00:00 2001 From: pat-s Date: Sat, 27 Apr 2024 19:14:01 +0000 Subject: [PATCH] Address CI warnings (#312) Reviewed-on: https://codeberg.org/Codeberg/pages-server/pulls/312 Reviewed-by: crapStone Co-authored-by: pat-s Co-committed-by: pat-s --- .woodpecker.yml | 40 ++++++++++++++++++++++------------------ 1 file changed, 22 insertions(+), 18 deletions(-) diff --git a/.woodpecker.yml b/.woodpecker.yml index de8341c..370ffed 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -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"]