From 195dc9663996ac61052c4b52f5e6bb567fa35830 Mon Sep 17 00:00:00 2001 From: Luc Perkins Date: Thu, 28 Mar 2024 11:39:17 -0300 Subject: [PATCH] Cache dev shell in FlakeHub Cache --- .github/workflows/flakehub-cache.yml | 33 ++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/flakehub-cache.yml diff --git a/.github/workflows/flakehub-cache.yml b/.github/workflows/flakehub-cache.yml new file mode 100644 index 0000000..17be8d2 --- /dev/null +++ b/.github/workflows/flakehub-cache.yml @@ -0,0 +1,33 @@ +name: Push dev shell to FlakeHub Cache + +on: + push: + branches: [main] + +jobs: + push-dev-shell-to-flakehub-cache: + env: + ACTIONS_STEP_DEBUG: true + runs-on: ${{ matrix.systems.runner }} + permissions: + id-token: "write" + contents: "read" + strategy: + matrix: + systems: + - nix-system: "aarch64-darwin" + runner: "macos-latest-xlarge" + - nix-system: "x86_64-darwin" + runner: "macos-12" + - nix-system: "x86_64-linux" + runner: "ubuntu-22.04" + steps: + - uses: actions/checkout@v3 + - uses: DeterminateSystems/nix-installer-action@main + - uses: DeterminateSystems/magic-nix-cache-action@main + with: + use-flakehub: true + - name: Build dev shell for ${{ matrix.systems.nix-system }} on ${{ matrix.systems.runner }} + run: | + nix build .#devShells.${{ matrix.systems.nix-system }}.default +