@@ -8,7 +8,7 @@ name: Commit Bot
8
8
# "If an action pushes code using the repository's GITHUB_TOKEN, a new workflow will not run"
9
9
#
10
10
# - Processing of either the 'master' or 'develop' branch may be stopped by creating the variables
11
- # vars.block_master or vars.block_develop with any value.
11
+ # vars.block_master or vars.block_develop with the value "yes" (case-insensitive) .
12
12
# https://github.com/boostorg/boost/settings/variables/actions
13
13
#
14
14
@@ -33,24 +33,26 @@ jobs:
33
33
run : |
34
34
set -xe
35
35
branches=""
36
+ block_master="${{ vars.block_master }}"
37
+ block_develop="${{ vars.block_develop }}"
36
38
if [[ "${{ github.event_name }}" == "push" ]]; then
37
- if [[ ! -n "${{ vars.block_master }}" && "${{ github.ref_name }}" == "master" ]]; then
39
+ # The job doesn't run on "push" so this will not execute.
40
+ if [[ ! ${block_master,,} =~ "yes" && "${{ github.ref_name }}" == "master" ]]; then
38
41
branches="master"
39
- elif [[ ! -n "${{ vars. block_develop }} " && "${{ github.ref_name }}" == "develop" ]]; then
42
+ elif [[ ! ${ block_develop,,} =~ "yes " && "${{ github.ref_name }}" == "develop" ]]; then
40
43
branches="develop"
41
- else
42
- branches="${{ github.ref_name }}"
43
44
fi
44
45
else
45
46
# from a schedule:
46
- if [[ ! -n "${{ vars. block_master }} " ]]; then
47
+ if [[ ! ${ block_master,,} =~ "yes " ]]; then
47
48
branches="master"
48
49
fi
49
- if [[ ! -n "${{ vars. block_develop }} " ]]; then
50
+ if [[ ! ${ block_develop,,} =~ "yes " ]]; then
50
51
branches="${branches} develop"
51
52
fi
52
53
fi
53
54
echo "branches=$branches" >> $GITHUB_OUTPUT
55
+ echo "branches is ${branches}"
54
56
55
57
- name : Checkout master repository
56
58
uses : actions/checkout@v4
0 commit comments