Download and Mirror packages from anaconda #4935
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| permissions: | |
| contents: read | |
| name: Download and Mirror packages from anaconda | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: "13 */6 * * *" | |
| defaults: | |
| run: | |
| working-directory: ./ | |
| jobs: | |
| mirror-pkgs: | |
| # as advised by github! | |
| permissions: | |
| contents: read | |
| strategy: | |
| max-parallel: 1 | |
| matrix: | |
| subdir: | |
| - linux-64 | |
| - osx-64 | |
| - osx-arm64 | |
| - win-64 | |
| - linux-aarch64 | |
| - linux-ppc64le | |
| - noarch | |
| channel: | |
| - conda-forge | |
| - bioconda | |
| fail-fast: false | |
| uses: channel-mirrors/mirrormirror/.github/workflows/run_mirror.yml@main | |
| with: | |
| channel: ${{ matrix.channel }} | |
| package: all | |
| subdir: ${{ matrix.subdir }} | |
| registry: ghcr.io/channel-mirrors | |
| workers: 4 | |
| timeout: 500 | |
| ORAS_USER: "channel-mirrors" | |
| secrets: | |
| ORAS_PASS: ${{ secrets.GHA_PAT }} | |
| keepalive: | |
| if: github.repository == 'channel-mirrors/mirrormirror' | |
| runs-on: ubuntu-latest | |
| permissions: | |
| actions: write | |
| steps: | |
| - name: Re-enable workflow | |
| env: | |
| GITHUB_TOKEN: ${{ github.token }} | |
| shell: sh | |
| run: | | |
| case "${GITHUB_WORKFLOW_REF:?}" in | |
| "${GITHUB_REPOSITORY:?}"/.github/workflows/*.y*ml@*) ;; | |
| *) false ;; | |
| esac | |
| workflow="${GITHUB_WORKFLOW_REF%%@*}" | |
| workflow="${workflow#${GITHUB_REPOSITORY}/.github/workflows/}" | |
| gh api -X PUT "repos/${GITHUB_REPOSITORY}/actions/workflows/${workflow}/enable" |