-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (40 loc) · 1.25 KB
/
mirror.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
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@V27
- 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/*