Pin releases on cachix #1
This file contains 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: "Pin release on Cachix" | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
tag: | ||
description: "The existing tag to build and pin" | ||
type: "string" | ||
required: true | ||
workflow_call: | ||
secrets: | ||
GITHUB_TOKEN: | ||
required: false | ||
CACHIX_AUTH_TOKEN: | ||
required: true | ||
jobs: | ||
pin: | ||
if: startsWith(github.ref, "refs/tags/v") | ||
matrix: | ||
os: [[ubuntu-latest], [macos-latest], [self-hosted, macOS], [nscloud-arm64]] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: cachix/install-nix-action@v23 | ||
with: | ||
extra_nix_config: | | ||
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} | ||
- uses: cachix/cachix-action@v12 | ||
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) |