From ecb5ca675bf5c244b06ea9a25970e8efa4581a04 Mon Sep 17 00:00:00 2001 From: "Matthew W. Thompson" Date: Thu, 12 Dec 2024 12:08:34 -0600 Subject: [PATCH] Update action versions --- .github/workflows/cookbook_pr_closed.yaml | 2 +- .github/workflows/cookbook_pr_opened.yaml | 7 +++++-- .github/workflows/cookbook_preproc.yaml | 17 ++++++----------- .github/workflows/lint.yaml | 14 ++++++-------- 4 files changed, 18 insertions(+), 22 deletions(-) diff --git a/.github/workflows/cookbook_pr_closed.yaml b/.github/workflows/cookbook_pr_closed.yaml index e0b473e19..f2daacf16 100644 --- a/.github/workflows/cookbook_pr_closed.yaml +++ b/.github/workflows/cookbook_pr_closed.yaml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Clean up PR cache shell: bash -l {0} diff --git a/.github/workflows/cookbook_pr_opened.yaml b/.github/workflows/cookbook_pr_opened.yaml index a07ad263c..335c6d9a9 100644 --- a/.github/workflows/cookbook_pr_opened.yaml +++ b/.github/workflows/cookbook_pr_opened.yaml @@ -8,19 +8,22 @@ on: branches: - main +defaults: + run: + shell: bash -l {0} + jobs: preprocess: runs-on: ubuntu-latest steps: - name: Checkout deployment branch - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: ref: _cookbook_data_main clean: false - name: Copy cache from main to PR branch - shell: bash -l {0} run: | git config user.name github-actions git config user.email github-actions@github.com diff --git a/.github/workflows/cookbook_preproc.yaml b/.github/workflows/cookbook_preproc.yaml index b106f9a0e..e1dae1724 100644 --- a/.github/workflows/cookbook_preproc.yaml +++ b/.github/workflows/cookbook_preproc.yaml @@ -14,6 +14,10 @@ on: branches: - main +defaults: + run: + shell: bash -l {0} + concurrency: group: ${{ github.workflow }}-${{ inputs.pr_number || github.ref || github.run_id }} cancel-in-progress: true @@ -24,7 +28,6 @@ jobs: steps: - name: Choose deployment branch - shell: bash -l {0} run: | if [[ ${{ github.event_name }} != "workflow_dispatch" ]]; then echo "DEPLOY_BRANCH=_cookbook_data_$GITHUB_REF_NAME" >> "$GITHUB_ENV" @@ -83,30 +86,23 @@ jobs: return created_run.data.id - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Install Conda environment - uses: mamba-org/setup-micromamba@v1 + uses: mamba-org/setup-micromamba@v2 with: environment-file: devtools/conda-envs/examples_env.yml - # default - will pull down 2.0 which we don't want! - # micromamba-version: latest - # pin to latest 1.x release - micromamba-version: "1.5.10-0" - name: Pre-process and execute notebooks - shell: bash -l {0} run: | set -e python source/_ext/proc_examples.py --prefix=deploy/ --cache-branch=${DEPLOY_BRANCH} --log-failures=notebooks_log.json - name: Read notebooks log if: always() - shell: bash -l {0} run: echo "NOTEBOOKS_LOG=$(cat 'notebooks_log.json')" >> "$GITHUB_ENV" - name: Deploy cache - shell: bash -l {0} run: | cd deploy @@ -126,7 +122,6 @@ jobs: - name: Trigger RTD build # RTD doesn't offer a way to manually trigger builds in PRs, so we'll just do this for other builds if: github.event_name == 'schedule' || github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && inputs.pr_number == '') - shell: bash -l {0} run: | curl -X POST -d "branches=$GITHUB_REF_NAME" -d "token=${{ secrets.RTD_WEBHOOK_TOKEN }}" https://readthedocs.org/api/v2/webhook/openff-docs/243876/ diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index fe238d17a..fdfca2847 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -11,28 +11,26 @@ on: - cron: "0 0 * * *" workflow_dispatch: +defaults: + run: + shell: bash -l {0} + jobs: check: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Install Conda environment - uses: mamba-org/setup-micromamba@v1 + uses: mamba-org/setup-micromamba@v2 with: environment-file: devtools/conda-envs/lint_env.yml - # default - will pull down 2.0 which we don't want! - # micromamba-version: latest - # pin to latest 1.x release - micromamba-version: "1.5.10-0" - name: Check dead links - shell: bash -l {0} run: | FORCE_COLOR=1 sphinx-build -n -W --keep-going -b linkcheck source build/linkcheck - name: Check code blocks - shell: bash -l {0} run: | FORCE_COLOR=1 sphinx-build -n -W --keep-going -b codelinter source build/codelinter