diff --git a/.github/workflows/example-14.yml b/.github/workflows/example-14.yml new file mode 100644 index 00000000..f73d9a95 --- /dev/null +++ b/.github/workflows/example-14.yml @@ -0,0 +1,81 @@ +name: "Example 14: Remove defaults channel" + +on: + pull_request: + branches: + - "*" + push: + branches: + - "develop" + - "main" + - "master" + schedule: + # Note that cronjobs run on master/main by default + - cron: "0 0 * * *" + +concurrency: + group: + ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} + cancel-in-progress: true + +jobs: + example-14: + # prevent cronjobs from running on forks + if: + (github.event_name == 'schedule' && github.repository == + 'conda-incubator/setup-miniconda') || (github.event_name != 'schedule') + name: + Ex14 (${{ matrix.os }}, remove=${{ matrix.conda-remove-defaults }}, + channels=${{ matrix.channels }}) + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: ["ubuntu-latest", "macos-latest", "windows-latest"] + conda-remove-defaults: ["true", "false"] + channels: + [ + "conda-forge", + "conda-forge,nodefaults", + "conda-forge,defaults,nodefaults", + ] + timeout-minutes: 30 + steps: + - uses: actions/checkout@v4 + - uses: ./ + id: setup-miniconda + continue-on-error: true + with: + channels: ${{ matrix.channels }} + conda-remove-defaults: ${{ matrix.conda-remove-defaults }} + python-version: "3.12" + - shell: bash -el {0} + run: | + cat < { minicondaVersion: core.getInput("miniconda-version"), miniforgeVariant: core.getInput("miniforge-variant"), miniforgeVersion: core.getInput("miniforge-version"), + condaRemoveDefaults: core.getInput("conda-remove-defaults"), pythonVersion: core.getInput("python-version"), removeProfiles: core.getInput("remove-profiles"), condaConfig: Object.freeze({ diff --git a/src/types.ts b/src/types.ts index 814451ce..d505319d 100644 --- a/src/types.ts +++ b/src/types.ts @@ -84,6 +84,7 @@ export interface IActionInputs { readonly minicondaVersion: string; readonly miniforgeVariant: string; readonly miniforgeVersion: string; + readonly condaRemoveDefaults: string; readonly pythonVersion: string; readonly removeProfiles: string; readonly useMamba: string;