88jobs :
99 lint :
1010 runs-on : ubuntu-latest
11- if : >
12- github.event_name == 'pull_request' ||
13- (
14- github.repository == 'PolicyEngine/policyengine-us-data'
15- && github.event.head_commit.message == 'Update PolicyEngine US data'
16- )
11+ if : |
12+ (github.repository == 'PolicyEngine/policyengine-us-data')
13+ && (github.event.head_commit.message == 'Update PolicyEngine US data')
1714 name : Lint
1815 steps :
1916 - uses : actions/checkout@v4
3027 check-version :
3128 name : Check version
3229 runs-on : ubuntu-latest
33- if : >
34- github.event_name == 'pull_request' ||
35- (
36- github.repository == 'PolicyEngine/policyengine-us-data'
37- && github.event.head_commit.message != 'Update PolicyEngine US data'
38- )
30+ if : |
31+ (github.repository == 'PolicyEngine/policyengine-us-data')
32+ && !(github.event.head_commit.message == 'Update PolicyEngine US data')
3933 steps :
4034 - name : Checkout code
4135 uses : actions/checkout@v4
@@ -54,30 +48,19 @@ jobs:
5448 - name : Check version number has been properly updated
5549 run : " .github/is-version-number-acceptable.sh"
5650 - name : Update changelog
57- # if: github.event_name == 'push' && github.ref == 'refs/heads/main'
5851 uses : EndBug/add-and-commit@v9
5952 with :
6053 add : " ."
6154 committer_name : Github Actions[bot]
6255 author_name : Github Actions[bot]
6356 message : Update PolicyEngine US data
6457 github_token : ${{ secrets.POLICYENGINE_GITHUB }}
65- debug-job :
66- runs-on : ubuntu-latest
67- steps :
68- - name : Checkout code
69- uses : actions/checkout@v4
70- - name : Debug info
71- run : |
72- echo "Event name: ${{ github.event_name }}"
73- echo "Repository: ${{ github.repository }}"
74- echo "Commit message: ${{ github.event.head_commit.message }}"
7558 test :
7659 name : Build and test
7760 runs-on : ubuntu-latest
78- if : >
79- github.event_name == 'pull_request' ||
80- github.repository == 'PolicyEngine/policyengine-us- data'
61+ if : |
62+ ( github.repository == 'PolicyEngine/policyengine-us-data')
63+ && ( github.event.head_commit.message == 'Update PolicyEngine US data')
8164 steps :
8265 - name : Checkout code
8366 uses : actions/checkout@v4
@@ -104,10 +87,9 @@ jobs:
10487 publish-to-pypi :
10588 name : Publish to PyPI
10689 runs-on : ubuntu-latest
107- if : >
108- github.repository == 'PolicyEngine/policyengine-us-data'
109- && github.event_name == 'push'
110- && github.event.head_commit.message == 'Update PolicyEngine US data'
90+ if : |
91+ (github.repository == 'PolicyEngine/policyengine-us-data')
92+ && (github.event.head_commit.message == 'Update PolicyEngine US data')
11193 steps :
11294 - name : Checkout code
11395 uses : actions/checkout@v4
@@ -132,10 +114,9 @@ jobs:
132114 docker :
133115 name : Docker
134116 runs-on : ubuntu-latest
135- if : >
136- github.repository == 'PolicyEngine/policyengine-us-data'
137- && github.event_name == 'push'
138- && github.event.head_commit.message == 'Update PolicyEngine US data'
117+ if : |
118+ (github.repository == 'PolicyEngine/policyengine-us-data')
119+ && (github.event.head_commit.message == 'Update PolicyEngine US data')
139120 steps :
140121 - name : Checkout repo
141122 uses : actions/checkout@v4
@@ -152,10 +133,9 @@ jobs:
152133 publish-docs :
153134 name : Publish documentation
154135 runs-on : ubuntu-latest
155- if : >
156- github.repository == 'PolicyEngine/policyengine-us-data'
157- && github.event_name == 'push'
158- && github.event.head_commit.message == 'Update PolicyEngine US data'
136+ if : |
137+ (github.repository == 'PolicyEngine/policyengine-us-data')
138+ && (github.event.head_commit.message == 'Update PolicyEngine US data')
159139 steps :
160140 - name : Checkout code
161141 uses : actions/checkout@v4
@@ -179,10 +159,9 @@ jobs:
179159 name : Upload data
180160 runs-on : ubuntu-latest
181161 needs : [lint, test]
182- if : >
183- github.repository == 'PolicyEngine/policyengine-us-data'
184- && github.event_name == 'push'
185- && github.event.head_commit.message == 'Update PolicyEngine US data'
162+ if : |
163+ (github.repository == 'PolicyEngine/policyengine-us-data')
164+ && (github.event.head_commit.message == 'Update PolicyEngine US data')
186165 steps :
187166 - name : Checkout code
188167 uses : actions/checkout@v4
0 commit comments