Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 42fe53c

Browse files
committed
FIX: Dont skip one [skip azp] [skip appveyor] [skip actions]
1 parent f6b11e8 commit 42fe53c

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

.circleci/config.yml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,20 @@ version: 2.1
99
#
1010

1111
commands:
12+
check-skip:
13+
steps:
14+
- run:
15+
name: Check-skip
16+
command: |
17+
git log --max-count=1 --pretty=format:"%B" | tr "\n" " " > commit_message.txt
18+
export COMMIT_MESSAGE=$(cat commit_message.txt);
19+
echo "Got commit message:"
20+
echo "${COMMIT_MESSAGE}"
21+
if [[ -v CIRCLE_PULL_REQUEST ]] && ([[ "$COMMIT_MESSAGE" == *"[skip circle]"* ]] || [[ "$COMMIT_MESSAGE" == *"[circle skip]"* ]]); then
22+
echo "Skip detected, exiting job ${CIRCLE_JOB} for PR ${CIRCLE_PULL_REQUEST}."
23+
circleci-agent step halt;
24+
fi
25+
1226
merge:
1327
steps:
1428
- run:
@@ -24,20 +38,6 @@ commands:
2438
git pull --ff-only upstream "refs/pull/$(cat merge.txt)/merge";
2539
fi
2640
27-
check-skip:
28-
steps:
29-
- run:
30-
name: Check-skip
31-
command: |
32-
git log --max-count=1 --skip=1 --pretty=format:"%B" | tr "\n" " " > commit_message.txt
33-
export COMMIT_MESSAGE=$(cat commit_message.txt);
34-
echo "Got commit message:"
35-
echo "${COMMIT_MESSAGE}"
36-
if [[ -v CIRCLE_PULL_REQUEST ]] && ([[ "$COMMIT_MESSAGE" == *"[skip circle]"* ]] || [[ "$COMMIT_MESSAGE" == *"[circle skip]"* ]]); then
37-
echo "Skip detected, exiting job ${CIRCLE_JOB} for PR ${CIRCLE_PULL_REQUEST}."
38-
circleci-agent step halt;
39-
fi
40-
4141
apt-install:
4242
steps:
4343
- run:

0 commit comments

Comments
 (0)