1- name : CI/CD
1+ name : Push
22
33on :
4- pull_request :
5- branches : [main]
64 push :
75 branches : [main]
6+ workflow_dispatch :
87
98jobs :
109 lint :
1110 runs-on : ubuntu-latest
12- if : >
13- github.event_name == 'pull_request' ||
14- (
15- github.repository == 'PolicyEngine/policyengine-us-data'
16- && github.event.head_commit.message == 'Update PolicyEngine US data'
17- )
11+ if : |
12+ (github.repository == 'PolicyEngine/policyengine-us-data')
13+ && (github.event.head_commit.message == 'Update PolicyEngine US data')
1814 name : Lint
1915 steps :
2016 - uses : actions/checkout@v4
3127 check-version :
3228 name : Check version
3329 runs-on : ubuntu-latest
34- if : >
35- github.event_name == 'pull_request' ||
36- (
37- github.repository == 'PolicyEngine/policyengine-us-data'
38- && github.event.head_commit.message != 'Update PolicyEngine US data'
39- )
30+ if : |
31+ (github.repository == 'PolicyEngine/policyengine-us-data')
32+ && !(github.event.head_commit.message == 'Update PolicyEngine US data')
4033 steps :
4134 - name : Checkout code
4235 uses : actions/checkout@v4
5548 - name : Check version number has been properly updated
5649 run : " .github/is-version-number-acceptable.sh"
5750 - name : Update changelog
58- if : github.event_name == 'push' && github.ref == 'refs/heads/main'
5951 uses : EndBug/add-and-commit@v9
6052 with :
6153 add : " ."
6658 test :
6759 name : Build and test
6860 runs-on : ubuntu-latest
69- if : >
70- github.event_name == 'pull_request' ||
71- (
72- github.repository == 'PolicyEngine/policyengine-us-data'
73- && github.event.head_commit.message == 'Update PolicyEngine US data'
74- )
61+ if : |
62+ (github.repository == 'PolicyEngine/policyengine-us-data')
63+ && (github.event.head_commit.message == 'Update PolicyEngine US data')
7564 steps :
7665 - name : Checkout code
7766 uses : actions/checkout@v4
9887 publish-to-pypi :
9988 name : Publish to PyPI
10089 runs-on : ubuntu-latest
101- if : >
102- github.repository == 'PolicyEngine/policyengine-us-data'
103- && 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')
10493 steps :
10594 - name : Checkout code
10695 uses : actions/checkout@v4
@@ -125,9 +114,9 @@ jobs:
125114 docker :
126115 name : Docker
127116 runs-on : ubuntu-latest
128- if : >
129- github.repository == 'PolicyEngine/policyengine-us-data'
130- && 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')
131120 steps :
132121 - name : Checkout repo
133122 uses : actions/checkout@v4
@@ -144,9 +133,9 @@ jobs:
144133 publish-docs :
145134 name : Publish documentation
146135 runs-on : ubuntu-latest
147- if : >
148- github.repository == 'PolicyEngine/policyengine-us-data'
149- && 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')
150139 steps :
151140 - name : Checkout code
152141 uses : actions/checkout@v4
@@ -170,9 +159,9 @@ jobs:
170159 name : Upload data
171160 runs-on : ubuntu-latest
172161 needs : [lint, test]
173- if : >
174- github.repository == 'PolicyEngine/policyengine-us-data'
175- && 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')
176165 steps :
177166 - name : Checkout code
178167 uses : actions/checkout@v4
0 commit comments