Skip to content

Commit 23baa19

Browse files
authored
Merge pull request #4297 from samsrabin/workflows-with-ubuntu-26.04
Get workflows to work with ubuntu 26.04
2 parents 5aff598 + d5b84e2 commit 23baa19

21 files changed

Lines changed: 105 additions & 62 deletions

‎.github/workflows/check-compset-aliases.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
runs-on: ubuntu-latest
2626
steps:
2727
- name: Checkout repository
28-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
28+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
2929

3030
- name: Checkout submodules
3131
run: |

‎.github/workflows/check-testlists.yml‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,23 @@ on:
1717
- 'cime_config/testdefs/testlist_clm.xml'
1818
- '.github/workflows/check-testlists.yml'
1919

20+
# Allows you to run this workflow manually from the Actions tab
21+
workflow_dispatch:
22+
2023
jobs:
2124
testlist-supertestlists:
2225
runs-on: ubuntu-latest
2326
steps:
2427
# Checkout the code
25-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
28+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
2629

2730
# Set up the conda environment
28-
- uses: conda-incubator/setup-miniconda@2defc80cc6f4028b1780c50faf08dd505d698976 # v3
31+
- uses: conda-incubator/setup-miniconda@be893c923ea9cf1cf7cd510fbdde27c7e18cbdcb # v4.1.0
2932
with:
3033
activate-environment: ctsm_pylib
3134
environment-file: python/conda_env_ctsm_py.yml
3235
channels: conda-forge
33-
auto-activate-base: false
36+
auto-activate: false
3437

3538
- name: Print installed Python packages
3639
run: conda list

‎.github/workflows/docker-image-build-publish.yml‎

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,33 +39,32 @@ jobs:
3939
packages: write
4040
attestations: write
4141
id-token: write
42+
artifact-metadata: write
4243

4344
steps:
4445
- name: Checkout repository
45-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
46+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
4647

4748
# Uses the `docker/login-action` action to log in to the Container registry using the account and password that will publish the packages. Once published, the packages are scoped to the account defined here.
4849
- name: Log in to the Container registry
49-
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
50+
uses: docker/login-action@81c6f93d4bc991e510b342a00b419b3bb4efc5c6 # v4.7.0
5051
with:
5152
registry: ${{ env.REGISTRY }}
5253
username: ${{ github.actor }}
5354
password: ${{ secrets.GITHUB_TOKEN }}
5455

5556
# This step sets up Docker Buildx, which is needed for the multi-platform build in the next step
5657
# https://docs.docker.com/build/ci/github-actions/multi-platform/
57-
# v3.1.0
5858
- name: Set up Docker Buildx
59-
uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2
59+
uses: docker/setup-buildx-action@f87e5991a6d7451dcb8d9637bfbc97413f497069 # v4.4.1
6060

6161
# This step uses the `docker/build-push-action` action to build the image, based on the ctsm-docs `Dockerfile`.
6262
# It uses the `context` parameter to define the build's context as the set of files located in the specified path. For more information, see [Usage](https://github.com/docker/build-push-action#usage) in the README of the `docker/build-push-action` repository.
6363
# It uses the `tags` and `labels` parameters to tag and label the image with the output from the "meta" step.
6464
# Note that we should avoid relying on the "latest" tag for anything, but it's good practice to have one.
65-
# v6.15.0
6665
- name: Push Docker image
6766
id: push
68-
uses: docker/build-push-action@471d1dc4e07e5cdedd4c2171150001c434f0b7a4
67+
uses: docker/build-push-action@c3c9e263c25d99ce0380d002d59b67737d91b0dc # v7.4.0
6968
with:
7069
context: doc/ctsm-docs_container
7170
platforms: linux/amd64,linux/arm64
@@ -78,7 +77,7 @@ jobs:
7877

7978
# This step generates an artifact attestation for the image, which is an unforgeable statement about where and how it was built. It increases supply chain security for people who consume the image. For more information, see [Using artifact attestations to establish provenance for builds](/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds).
8079
- name: Generate artifact attestation
81-
uses: actions/attest-build-provenance@e8998f949152b193b063cb0ec769d69d929409be # v2
80+
uses: actions/attest-build-provenance@4d101475d8b20a2381f78447822ac1eab6504dd8 # v4.2.2
8281
with:
8382
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
8483
subject-digest: ${{ steps.push.outputs.digest }}

‎.github/workflows/docker-image-common.yml‎

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
steps:
3535

3636
- name: Checkout repository
37-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
37+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
3838

3939
# Ensure that the repository part of IMAGE_NAME is lowercase. This is needed because Docker requires image names to be entirely lowercase. Note that the *image name* part, set as IMAGE_BASENAME in the env block above, is *not* converted. This will cause the check-version job to fail if the IMAGE_BASENAME contains capitals. We don't want to silently fix that here; rather, we require the user to specify a lowercase IMAGE_BASENAME.
4040
- name: Get image name with lowercase repo
@@ -46,7 +46,7 @@ jobs:
4646
4747
# Uses the `docker/login-action` action to log in to the Container registry using the account and password that will publish the packages. Once published, the packages are scoped to the account defined here.
4848
- name: Log in to the Container registry
49-
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
49+
uses: docker/login-action@81c6f93d4bc991e510b342a00b419b3bb4efc5c6 # v4.7.0
5050
with:
5151
registry: ${{ env.REGISTRY }}
5252
username: ${{ github.actor }}
@@ -55,17 +55,16 @@ jobs:
5555
# This step uses [docker/metadata-action](https://github.com/docker/metadata-action#about) to extract tags and labels that will be applied to the specified image. The `id` "meta" allows the output of this step to be referenced in a subsequent step. The `images` value provides the base name for the tags and labels.
5656
- name: Extract metadata (tags, labels) for Docker
5757
id: meta
58-
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
58+
uses: docker/metadata-action@dc802804100637a589fabce1cb79ff13a1411302 # v6.2.0
5959
with:
6060
images: ${{ env.REGISTRY }}/${{ steps.set-image-name.outputs.IMAGE_NAME }}
6161

6262
# This step uses the `docker/build-push-action` action to build the image, based on the ctsm-docs `Dockerfile`.
6363
# It uses the `context` parameter to define the build's context as the set of files located in the specified path. For more information, see [Usage](https://github.com/docker/build-push-action#usage) in the README of the `docker/build-push-action` repository.
6464
# It uses the `tags` and `labels` parameters to tag and label the image with the output from the "meta" step.
65-
# v6.15.0
6665
- name: Build Docker image
6766
id: build-image
68-
uses: docker/build-push-action@471d1dc4e07e5cdedd4c2171150001c434f0b7a4
67+
uses: docker/build-push-action@c3c9e263c25d99ce0380d002d59b67737d91b0dc # v7.4.0
6968
with:
7069
context: doc/ctsm-docs_container
7170
push: false

‎.github/workflows/docker-image-get-version.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242

4343
steps:
4444
- name: Check out repository
45-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
45+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
4646

4747
- name: Get version number from Dockerfile and check it
4848
id: get-check-version

‎.github/workflows/docs-build-and-deploy.yml‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,13 @@ jobs:
4646
runs-on: ubuntu-latest
4747
steps:
4848
- name: Checkout repository
49-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
49+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
5050
with:
5151
# Get all history, ensuring all branches are available for checkout
5252
fetch-depth: 0
5353

5454
- name: Setup Pages
55-
uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5
55+
uses: actions/configure-pages@45bfe0192ca1faeb007ade9deae92b16b8254a0d # v6.0.0
5656

5757
# Check out all submodules because we might :literalinclude: something from one
5858
- name: Checkout all submodules
@@ -66,11 +66,11 @@ jobs:
6666
./build_docs_to_publish -d --site-root https://escomp.github.io/CTSM
6767
6868
- name: Upload artifact
69-
uses: actions/upload-pages-artifact@0252fc4ba7626f0298f0cf00902a25c6afc77fa8 # v3
69+
uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0
7070
with:
7171
# Upload publish dir
7272
path: 'doc/_publish'
7373

7474
- name: Deploy to GitHub Pages
7575
id: deployment
76-
uses: actions/deploy-pages@f33f41b675f0ab2dc5a6863c9a170fe83af3571e # v4
76+
uses: actions/deploy-pages@368f82528645a54fb793d4d04e342629a3f51346 # v5.0.1

‎.github/workflows/docs-common.yml‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
build-docs:
2222
runs-on: ubuntu-latest
2323
steps:
24-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
24+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
2525
with:
2626
fetch-depth: 0
2727
lfs: true
@@ -35,12 +35,12 @@ jobs:
3535
# Based on https://github.com/actions/cache/blob/main/examples.md#python---pip
3636
- name: Install python
3737
if: ${{ ! inputs.use_conda }}
38-
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
38+
uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
3939
with:
40-
python-version: '3.13.2' # needs to be coordinated with version in python/conda_env_ctsm_py.yml
40+
python-version: '3.13.13' # needs to be coordinated with version in python/conda_env_ctsm_py.yml
4141
- name: Cache pip
4242
if: ${{ ! inputs.use_conda }}
43-
uses: actions/cache@2f8e54208210a422b2efd51efaa6bd6d7ca8920f # v3
43+
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
4444
with:
4545
path: ~/.cache/pip
4646
key: ${{ runner.os }}-pip-${{ hashFiles('doc/ctsm-docs_container/requirements.txt') }}
@@ -54,15 +54,15 @@ jobs:
5454
# Do this if using conda
5555
- name: Set up conda environment
5656
if: ${{ inputs.use_conda }}
57-
uses: conda-incubator/setup-miniconda@2defc80cc6f4028b1780c50faf08dd505d698976 # v3
57+
uses: conda-incubator/setup-miniconda@be893c923ea9cf1cf7cd510fbdde27c7e18cbdcb # v4.1.0
5858
with:
5959
activate-environment: ${{ inputs.conda_env_name }}
6060
environment-file: ${{ inputs.conda_env_file }}
6161
channels: conda-forge
62-
auto-activate-base: false
62+
auto-activate: false
6363

6464
- name: Print installed Python packages
65-
run: conda list
65+
run: ${{ inputs.use_conda && 'conda list' || 'pip list' }}
6666

6767
- name: Build Sphinx docs with makefile
6868
run: |

‎.github/workflows/docs-omnibus.yml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424

2525
runs-on: ubuntu-latest
2626
steps:
27-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
27+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
2828
with:
2929
fetch-depth: 0
3030
lfs: true
@@ -36,12 +36,12 @@ jobs:
3636
3737
# Set up conda
3838
- name: Set up conda environment
39-
uses: conda-incubator/setup-miniconda@2defc80cc6f4028b1780c50faf08dd505d698976 # v3
39+
uses: conda-incubator/setup-miniconda@be893c923ea9cf1cf7cd510fbdde27c7e18cbdcb # v4.1.0
4040
with:
4141
activate-environment: ctsm_pylib
4242
environment-file: python/conda_env_ctsm_py.yml
4343
channels: conda-forge
44-
auto-activate-base: false
44+
auto-activate: false
4545

4646
- name: Print installed Python packages
4747
run: conda list

‎.github/workflows/docs-pr-failure-post-comment.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
3636
- name: Download logs
3737
if: steps.check.outputs.found == 'true'
38-
uses: actions/download-artifact@v4
38+
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
3939
with:
4040
name: ${{ env.DOCS_FAILURE_ARTIFACT }}
4141
path: ${{ env.DOCS_FAILURE_ARTIFACT }}

‎.github/workflows/docs-update-ctsm_pylib.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,10 @@ jobs:
5555
contents: read
5656
issues: write
5757
steps:
58-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
58+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
5959

6060
- name: Create issue
61-
uses: JasonEtco/create-an-issue@1b14a70e4d8dc185e5cc76d3bec9eab20257b2c5
61+
uses: JasonEtco/create-an-issue@1b14a70e4d8dc185e5cc76d3bec9eab20257b2c5 # v2.9.2
6262
env:
6363
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6464
with:

0 commit comments

Comments
 (0)