Skip to content

Mirror

Mirror #97

Workflow file for this run

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-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v30
- 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@v5
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/*