Skip to content

Commit

Permalink
MNT: fix link_checker.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
kmuehlbauer committed Feb 19, 2024
1 parent e4fefbe commit 6b2bc7e
Showing 1 changed file with 10 additions and 28 deletions.
38 changes: 10 additions & 28 deletions .github/workflows/link-checker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,43 +24,25 @@ on:
default: 'true'
type: string

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
link-checker:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
steps:
- name: Cancel previous runs
uses: styfle/cancel-workflow-action@0.11.0
with:
access_token: ${{ github.token }}
- uses: actions/checkout@v4

- name: Setup Mambaforge
uses: conda-incubator/setup-miniconda@v2
- name: Setup Micromamba
uses: mamba-org/setup-micromamba@v1
with:
miniforge-variant: Mambaforge
miniforge-version: latest
activate-environment: ${{ inputs.environment_name }}
use-mamba: true

- name: Set cache date
if: inputs.use_cached_environment == 'true'
run: echo "DATE=$(date +'%Y%m%d')" >> $GITHUB_ENV

- uses: actions/cache@v3
if: inputs.use_cached_environment == 'true'
with:
path: /usr/share/miniconda3/envs/${{ inputs.environment_name }}
key: linux-64-conda-${{ hashFiles('${{ inputs.environment_file }}') }}-${{ env.DATE }}
id: cache

- name: Update environment
if: |
inputs.use_cached_environment != 'true'
|| steps.cache.outputs.cache-hit != 'true'
run: mamba env update -n ${{ inputs.environment_name }} -f ${{ inputs.environment_file }}
environment-name: ${{ inputs.environment_name }}
environment-file: ${{ inputs.environment_file }}
cache-environment: ${{ inputs.use_cached_environment }}
cache-environment-key: "linux-64-conda-${{ hashFiles('${{ inputs.environment_file }}') }}-${{ env.TODAY }}"

- name: Disable notebook execution
shell: python
Expand Down

0 comments on commit 6b2bc7e

Please sign in to comment.