Skip to content

Commit 86351e7

Browse files
authored
Merge pull request #652 from JacksonBurns/fix/ci_downloadv4
github actions CI maintainence
2 parents b09290c + a85e44c commit 86351e7

File tree

2 files changed

+17
-14
lines changed

2 files changed

+17
-14
lines changed

.github/workflows/CI.yml

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ jobs:
6464

6565
# configures the mamba environment manager and builds the environment
6666
- name: Setup Mambaforge Python 3.7
67-
uses: conda-incubator/setup-miniconda@v2
67+
uses: conda-incubator/setup-miniconda@v3
6868
with:
6969
environment-file: RMG-Py/environment.yml
7070
miniforge-variant: Mambaforge
@@ -149,23 +149,24 @@ jobs:
149149
run: mkdir stable_regression_results
150150

151151
# Retrieve Stable Results for reference
152-
# Will need to use this -> https://github.com/dawidd6/action-download-artifact
152+
- name : Find ID of Reference Results
153+
env:
154+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
155+
run: |
156+
run_id=$(gh run list -R ReactionMechanismGenerator/RMG-Py --workflow="Continuous Integration" --branch main --limit 1 --json databaseId --jq '.[0].databaseId')
157+
echo "CI_RUN_ID=$run_id" >> $GITHUB_ENV
158+
153159
- name: Retrieve Stable Regression Results
154160
if: ${{ env.REFERENCE_JOB == 'false' }}
155-
uses: dsnopek/action-download-artifact@91dda23aa09c68860977dd0ed11d93c0ed3795e7 # see https://github.com/ReactionMechanismGenerator/RMG-Py/pull/2459#issuecomment-1582850815
161+
uses: actions/download-artifact@v4
156162
with:
157163
# this will search for the last successful execution of CI on main and download
158164
# the stable regression results
159-
workflow: CI.yml
160-
workflow_conclusion: success
161-
repo: ReactionMechanismGenerator/RMG-Py
162-
branch: main
165+
run-id: ${{ env.CI_RUN_ID }}
166+
repository: ReactionMechanismGenerator/RMG-Py
167+
github-token: ${{ secrets.GH_PAT }}
163168
name: stable_regression_results
164-
path: RMG-Py/stable_regression_results
165-
search_artifacts: true # retrieves the last run result, either scheduled daily or on push to main
166-
ensure_latest: true # ensures that the latest run is retrieved
167-
# should result in a set of folders inside stable_regression_results
168-
# each of which has the stable result for that example/test
169+
path: stable_regression_results
169170

170171
# Regression Testing - Actual Comparisons
171172
- name: Regression Tests - Compare to Baseline

.github/workflows/conda_build.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,10 @@ jobs:
2727
run: |
2828
conda config --set anaconda_upload yes
2929
- name: Build Binary
30-
env:
31-
CONDA_TOKEN: ${{ secrets.ANACONDA_TOKEN }}
3230
run: |
31+
# set a default value to the conda_token if needed (like from forks)
32+
: "${CONDA_TOKEN:=${{ secrets.ANACONDA_TOKEN }}}"
33+
: "${CONDA_TOKEN:=default_value}"
34+
echo "CONDA_TOKEN=$CONDA_TOKEN" >> $GITHUB_ENV
3335
conda config --add channels conda-forge
3436
conda-build --token $CONDA_TOKEN --user rmg .conda

0 commit comments

Comments
 (0)