@@ -29,18 +29,26 @@ jobs:
29
29
run : |
30
30
sudo apt update
31
31
sudo apt install moreutils
32
- - name : Run JSON Build
32
+ - name : |
33
+ npm run-script jsongen
34
+ git update-index -q --refresh
35
+ if ! git diff-index --quiet HEAD --; then
36
+ echo "CHANGED=true" >> $GITHUB_ENV
37
+ fi
33
38
run: npm run-script jsongen
34
39
- name : Setup Python
40
+ if : env.CHANGED == 'true'
35
41
uses : actions/setup-python@v4
36
42
with :
37
43
python-version : " 3.10"
38
44
- name : Install Dependencies
39
45
run : |
40
46
pip install openpyxl
41
47
- name : Run XLSX Build
48
+ if : env.CHANGED == 'true'
42
49
run : npm run-script xlsxgen
43
50
- name : Git Setup Global Config
51
+ if : env.CHANGED == 'true'
44
52
run : |
45
53
# Git setup
46
54
export GITHUB_USER=wstgbot
@@ -49,16 +57,19 @@ jobs:
49
57
git config --global user.email "[email protected] "
50
58
git config --global user.name $GITHUB_USER
51
59
- name : Setup Environment Variables
60
+ if : env.CHANGED == 'true'
52
61
run : |
53
62
# Setup some env vars etc for future use
54
63
echo "SRC_BASE="OWASP/wstg@"$(git log -1 --format=format:%h)" >> $GITHUB_ENV
55
64
echo "BRANCH_STAMP=$(date +"%Y%m%d%H%M%S")" >> $GITHUB_ENV
56
65
echo "SHORT_DATE=$(date +"%Y-%m-%d")" >> $GITHUB_ENV
57
66
- name : Create Feature Branch
67
+ if : env.CHANGED == 'true'
58
68
run : |
59
69
# Checkout what will be the new feature branch
60
70
git checkout -b $BRANCH_STAMP
61
71
- name : Push Feature Branch and Raise PR
72
+ if : env.CHANGED == 'true'
62
73
run : |
63
74
# If there are changes: add, commit, PR
64
75
git add checklists/
0 commit comments