Skip to content

Commit c6fecdb

Browse files
authored
Merge pull request #2411 from ReactionMechanismGenerator/schedule_condition_fix
simplify condition checking for scheduled vs pushes CI
2 parents 2acefd7 + 37f5020 commit c6fecdb

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

.github/workflows/CI.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,8 @@ jobs:
131131
132132
# Upload Regression Results as Stable if Scheduled or Push to Main
133133
- name: Upload Results as Reference
134-
# upload the results for scheduled CI and pushes to main
135-
if: ${{ github.event_name == 'schedule' || github.ref == 'refs/heads/main' }}
134+
# upload the results for scheduled CI (on main) and pushes to main
135+
if: github.ref == 'refs/heads/main'
136136
uses: actions/upload-artifact@v3
137137
with:
138138
name: stable_regression_results
@@ -141,7 +141,7 @@ jobs:
141141
142142
# Upload Regression Results as Dynamic if Push to non-main Branch
143143
- name: Upload Results as Dynamic
144-
if: ${{ github.event_name != 'schedule' || github.ref != 'refs/heads/main' }}
144+
if: github.ref != 'refs/heads/main'
145145
uses: actions/upload-artifact@v3
146146
with:
147147
name: dynamic_regression_results
@@ -154,7 +154,7 @@ jobs:
154154
# Retrieve Stable Results for reference
155155
# Will need to use this -> https://github.com/dawidd6/action-download-artifact
156156
- name: Retrieve Stable Regression Results
157-
if: ${{ github.event_name != 'schedule' }}
157+
if: github.ref != 'refs/heads/main'
158158
uses: dawidd6/action-download-artifact@v2
159159
with:
160160
# this will search for the last scheduled execution of CI on main and download
@@ -163,13 +163,14 @@ jobs:
163163
workflow_conclusion: success
164164
branch: main
165165
name: stable_regression_results
166+
path: stable_regression_results
166167
search_artifacts: true # retrieves the last run result, either scheduled daily or on push to main
167168
# should result in a set of folders inside stable_regression_results
168169
# each of which has the stable result for that example/test
169170

170171
# Regression Testing - Actual Comparisons
171172
- name: Regression Tests - Compare to Baseline
172-
if: ${{ github.event_name != 'schedule' }}
173+
if: github.ref != 'refs/heads/main'
173174
env:
174175
REFERENCE: stable_regression_results
175176
run: |

0 commit comments

Comments
 (0)