Mirror #181
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
| name: Mirror | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| bindistRegex: | |
| description: "Regex for which bindists to update" | |
| required: false | |
| type: string | |
| schedule: | |
| - cron: "0 20 * * 0" | |
| jobs: | |
| mirror: | |
| runs-on: ubuntu-24.04 | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: DeterminateSystems/determinate-nix-action@v3 | |
| - uses: DeterminateSystems/magic-nix-cache-action@main | |
| - name: Set release tag name | |
| id: release-tag-name | |
| run: | | |
| echo "TAG=$(date --utc +'%Y%m%dT%H%M%S')" >> "$GITHUB_OUTPUT" | |
| - name: Mirror | |
| run: | | |
| nix run . -- --download-url-prefix \ | |
| https://github.com/${{ github.repository }}/releases/download/$TAG/ \ | |
| --bindist-regex '${{ inputs.bindistRegex || '' }}' | |
| env: | |
| TAG: ${{ steps.release-tag-name.outputs.TAG }} | |
| - uses: stefanzweifel/git-auto-commit-action@v7 | |
| id: auto-commit-action | |
| with: | |
| commit_message: Update mirror metadata | |
| - uses: softprops/action-gh-release@v2 | |
| if: steps.auto-commit-action.outputs.changes_detected == 'true' | |
| with: | |
| tag_name: ${{ steps.release-tag-name.outputs.TAG }} | |
| files: | | |
| artifacts/* |