Fixed crane #239
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: "Build and cache hc-pilot" | |
on: | |
push: | |
branches: [ main, main-0.3, main-0.4 ] | |
pull_request: | |
branches: [ main, main-0.3, main-0.4 ] | |
jobs: | |
build-and-cache-hc-pilot: | |
strategy: | |
fail-fast: false | |
matrix: | |
platform: [macos-latest, ubuntu-22.04, macos-13] | |
runs-on: ${{ matrix.platform }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install nix | |
uses: cachix/install-nix-action@v27 | |
with: | |
github_access_token: ${{ secrets.GITHUB_TOKEN }} | |
nix_path: nixpkgs=channel:nixos-24.05 | |
- uses: cachix/cachix-action@v15 | |
with: | |
name: holochain-ci | |
- uses: cachix/cachix-action@v15 | |
with: | |
name: darksoil-studio | |
- name: Build and cache hc-pilot | |
env: | |
CACHIX_AUTH_TOKEN: "${{ secrets.DARKSOIL_CACHIX_AUTH_TOKEN }}" | |
run: | | |
nix build --accept-flake-config -L .#hc-pilot | |
cachix push darksoil-studio $(nix path-info --json --accept-flake-config --no-warn-dirty .#hc-pilot | nix run nixpkgs#jq -- -r 'keys[0]') | |
- name: Pin hc-pilot | |
if: github.event_name != 'pull_request' && github.ref_name == 'main' | |
env: | |
CACHIX_AUTH_TOKEN: "${{ secrets.DARKSOIL_CACHIX_AUTH_TOKEN }}" | |
run: | | |
cachix pin darksoil-studio hc-pilot $(nix path-info --json --accept-flake-config --no-warn-dirty .#hc-pilot | nix run nixpkgs#jq -- -r 'keys[0]') |