Skip to content

Commit 2696ad0

Browse files
authored
Merge branch 'mahf708/ig/upgrade-gh-workflows' (PR E3SM-Project#6686)
Adds concurrency checks so that only one version of each workflow is running from the same type of event. Ensures these workflows only run in E3SM-Project/E3SM for now. Also upgrades container for f and w cases to add new lnd files that were made default recently. Fixes E3SM-Project#6652
2 parents accee4c + aef19a4 commit 2696ad0

8 files changed

+37
-13
lines changed

.github/workflows/e3sm-gh-ci-cime-tests.yml

+6-2
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,14 @@ on:
2222

2323
workflow_dispatch:
2424

25+
concurrency:
26+
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number || github.run_id }}
27+
cancel-in-progress: true
28+
2529
jobs:
2630

2731
ci:
28-
if: ${{ github.event.repository.name == 'e3sm' }}
32+
if: ${{ github.repository == 'E3SM-Project/E3SM' }}
2933
runs-on: ubuntu-latest
3034
strategy:
3135
fail-fast: false
@@ -36,7 +40,7 @@ jobs:
3640
- SMS_D_Ln5_P4.ne4pg2_oQU480.F2010-SCREAMv1-MPASSI.ghci-oci_gnu
3741
- ERS_Ld5_P4.ne4pg2_oQU480.F2010-SCREAMv1-MPASSI.ghci-oci_gnu.eamxx-prod
3842
container:
39-
image: ghcr.io/e3sm-project/containers-ghci:ghci-0.1.0
43+
image: ghcr.io/e3sm-project/containers-ghci:ghci-0.2.0
4044

4145
steps:
4246
-

.github/workflows/e3sm-gh-ci-w-cime-tests.yml

+8-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: gh
1+
name: gh-w
22

33
on:
44
pull_request:
@@ -11,10 +11,14 @@ on:
1111

1212
workflow_dispatch:
1313

14+
concurrency:
15+
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number || github.run_id }}
16+
cancel-in-progress: true
17+
1418
jobs:
1519

16-
ci-w:
17-
if: ${{ github.event.repository.name == 'e3sm' }}
20+
ci:
21+
if: ${{ github.repository == 'E3SM-Project/E3SM' }}
1822
runs-on: ubuntu-latest
1923
strategy:
2024
fail-fast: false
@@ -23,7 +27,7 @@ jobs:
2327
- SMS_D_Ld1_P8.ne4pg2_oQU480.WCYCL2010NS.ghci-oci_gnu
2428
- ERS_Ld3_P8.ne4pg2_oQU480.WCYCL2010NS.ghci-oci_gnu.allactive-wcprod_1850
2529
container:
26-
image: ghcr.io/e3sm-project/containers-ghci:ghci-0.1.0
30+
image: ghcr.io/e3sm-project/containers-ghci:ghci-0.2.0
2731

2832
steps:
2933
-

.github/workflows/e3sm-gh-md-linter.yml

+5
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,13 @@ on:
1010
# for now let's not lint files in eamxx
1111
- '!components/eamxx/**/*.md'
1212

13+
concurrency:
14+
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number || github.run_id }}
15+
cancel-in-progress: true
16+
1317
jobs:
1418
linter:
19+
if: ${{ github.repository == 'E3SM-Project/E3SM' }}
1520
runs-on: ubuntu-latest
1621
steps:
1722
- uses: actions/checkout@v4

.github/workflows/e3sm-gh-pages.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ concurrency:
1515

1616
jobs:
1717
Build-and-Deploy-docs:
18-
if: ${{ github.event.repository.name == 'e3sm' }}
18+
if: ${{ github.repository == 'E3SM-Project/E3SM' }}
1919
runs-on: ubuntu-latest
2020
steps:
2121
- uses: actions/checkout@v4

.github/workflows/e3sm-gh-tools-mkatmsrffile-test.yml

+6-4
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,13 @@ on:
1111
- cron: '00 15 * * 2'
1212
workflow_dispatch:
1313

14+
concurrency:
15+
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number || github.run_id }}
16+
cancel-in-progress: true
17+
1418
jobs:
1519
mkatmsrffile-test:
20+
if: ${{ github.repository == 'E3SM-Project/E3SM' }}
1621
runs-on: ubuntu-latest
1722
defaults:
1823
run:
@@ -31,18 +36,15 @@ jobs:
3136
uses: conda-incubator/setup-miniconda@v3
3237
with:
3338
activate-environment: "envmkatmsrffile"
34-
miniforge-variant: Mambaforge
3539
miniforge-version: latest
36-
use-mamba: true
37-
mamba-version: "*"
3840
channel-priority: strict
3941
auto-update-conda: true
4042
python-version: 3.11
4143
-
4244
name: Install dependencies
4345
run: |
4446
echo $CONDA_PREFIX
45-
mamba install -y nco xarray numba numpy netcdf4
47+
conda install -y nco xarray numba numpy netcdf4 -c conda-forge
4648
-
4749
name: Run tests
4850
working-directory: components/eam/tools/mkatmsrffile

.github/workflows/eamxx-gh-ci-standalone.yml

+5
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,14 @@ on:
1515

1616
workflow_dispatch:
1717

18+
concurrency:
19+
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number || github.run_id }}
20+
cancel-in-progress: true
21+
1822
jobs:
1923

2024
ci:
25+
if: ${{ github.repository == 'E3SM-Project/E3SM' }}
2126
runs-on: ubuntu-latest
2227
strategy:
2328
fail-fast: false

.github/workflows/eamxx-gh-pages.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ concurrency:
3434
jobs:
3535

3636
eamxx-docs:
37-
if: ${{ github.event.repository.name == 'scream' }}
37+
if: ${{ github.repository == 'E3SM-Project/scream' }}
3838
runs-on: ubuntu-latest
3939

4040
steps:

.github/workflows/eamxx_default_files.yml

+5-1
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,13 @@ on:
1111
- cron: '00 00 * * *'
1212
workflow_dispatch:
1313

14+
concurrency:
15+
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number || github.run_id }}
16+
cancel-in-progress: true
17+
1418
jobs:
1519
scream-defaults:
16-
if: ${{ github.event.repository.name == 'e3sm' }}
20+
if: ${{ github.repository == 'E3SM-Project/E3SM' }}
1721
runs-on: ubuntu-latest
1822
outputs:
1923
event_name: ${{ github.event_name }}

0 commit comments

Comments
 (0)