From 0088be7da1c97b151534b873ad48867845b975a5 Mon Sep 17 00:00:00 2001 From: Sebastian Spaink <3441183+sspaink@users.noreply.github.com> Date: Wed, 27 Oct 2021 10:49:20 -0500 Subject: [PATCH] fix: stop triggering share-artifacts on release/tags (#9996) --- .circleci/config.yml | 3 +++ scripts/check-file-changes.sh | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 028198bbd..e5d535bf4 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -535,6 +535,9 @@ workflows: branches: ignore: - master + - release.* + tags: + ignore: /.*/ - 'release': requires: - 'test-go-windows' diff --git a/scripts/check-file-changes.sh b/scripts/check-file-changes.sh index fa141afc4..72280fcc0 100755 --- a/scripts/check-file-changes.sh +++ b/scripts/check-file-changes.sh @@ -1,9 +1,10 @@ #!/bin/bash +# CIRCLE-CI SCRIPT: This file is used exclusively for CI # To prevent the tests/builds to run for only a doc change, this script checks what files have changed in a pull request. BRANCH="$(git rev-parse --abbrev-ref HEAD)" echo $BRANCH -if [[ "$BRANCH" != "master" ]] && [[ "$BRANCH" != release* ]]; then # This should never skip for master and release branches +if [[ ${CIRCLE_PULL_REQUEST##*/} != "" ]]; then # Only skip if their is an associated pull request with this job # Ask git for all the differences between this branch and master # Then use grep to look for changes in the .circleci/ directory, anything named *.go or *.mod or *.sum or *.sh or Makefile # If no match is found, then circleci step halt will stop the CI job but mark it successful