-
Notifications
You must be signed in to change notification settings - Fork 350
39 lines (32 loc) · 944 Bytes
/
pin.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
name: "Pin release on Cachix"
on:
workflow_dispatch:
inputs:
tag:
description: "The existing tag to build and pin"
type: "string"
required: true
workflow_call:
secrets:
CACHIX_AUTH_TOKEN:
required: true
jobs:
pin:
if: startsWith(github.ref, 'refs/tags/v')
strategy:
fail-fast: false
matrix:
os: [[ubuntu-latest], [macos-latest], [self-hosted, macOS], [self-hosted, linux, ARM64]]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v30
with:
extra_nix_config: |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
- uses: cachix/cachix-action@v15
with:
name: devenv
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
- name: Pin release
run: cachix pin devenv ${{ github.ref_name }} $(nix build --accept-flake-config --print-out-paths)