From 9eb2d208599ad3b5ad3b4625d58ad41f7bddd574 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Sat, 18 Feb 2023 21:49:56 +0800 Subject: [PATCH 1/3] only trigger docs build and publish when docs changed --- .drone.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.drone.yml b/.drone.yml index dc8423875a6f..ff8a5ca22b5b 100644 --- a/.drone.yml +++ b/.drone.yml @@ -947,6 +947,9 @@ trigger: - push - tag - pull_request + paths: + include: + - docs/** steps: - name: build-docs From de8c243c6917a12855af3550b88e5936975494dc Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Sat, 18 Feb 2023 22:19:56 +0800 Subject: [PATCH 2/3] Remove env GO111MODULE because we just use default value of it --- .drone.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.drone.yml b/.drone.yml index ff8a5ca22b5b..8e6552569f8c 100644 --- a/.drone.yml +++ b/.drone.yml @@ -112,7 +112,6 @@ steps: image: golang:1.19 # this step is kept as the lowest version of golang that we support pull: always environment: - GO111MODULE: on GOPROXY: https://goproxy.io commands: - go build -o gitea_no_gcc # test if build succeeds without the sqlite tag @@ -124,7 +123,6 @@ steps: - name: build-backend-arm64 image: golang:1.20 environment: - GO111MODULE: on GOPROXY: https://goproxy.io GOOS: linux GOARCH: arm64 @@ -140,7 +138,6 @@ steps: - name: build-backend-windows image: golang:1.20 environment: - GO111MODULE: on GOPROXY: https://goproxy.io GOOS: windows GOARCH: amd64 @@ -155,7 +152,6 @@ steps: - name: build-backend-386 image: golang:1.20 environment: - GO111MODULE: on GOPROXY: https://goproxy.io GOOS: linux GOARCH: 386 From 68825a5352d130f27d19e2f631bc50bbdac9697e Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Sun, 19 Feb 2023 12:27:50 +0800 Subject: [PATCH 3/3] Don't run other drone jobs if only docs changed --- .drone.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.drone.yml b/.drone.yml index 8e6552569f8c..7ad38b179e0a 100644 --- a/.drone.yml +++ b/.drone.yml @@ -12,6 +12,9 @@ trigger: - push - tag - pull_request + paths: + exclude: + - docs/** volumes: - name: deps @@ -179,6 +182,9 @@ trigger: - push - tag - pull_request + paths: + exclude: + - docs/** volumes: - name: deps @@ -406,6 +412,9 @@ trigger: - push - tag - pull_request + paths: + exclude: + - docs/** volumes: - name: deps @@ -513,6 +522,9 @@ depends_on: trigger: event: - pull_request + paths: + exclude: + - docs/** volumes: - name: deps @@ -692,6 +704,9 @@ trigger: - "release/*" event: - push + paths: + exclude: + - docs/** depends_on: - testing-amd64 @@ -1175,6 +1190,9 @@ depends_on: trigger: ref: - "refs/pull/**" + paths: + exclude: + - docs/** steps: - name: dryrun