This repository has been archived by the owner on Mar 14, 2024. It is now read-only.
chore(deps): Bump DeterminateSystems/flakehub-push from d079d466e04c6b982eb532ed852b1505fe81434f to 038c6a99bcaa71486db5a82a84e018a7f2550b0d #135
Workflow file for this run
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: "Cache" | |
on: | |
pull_request: | |
push: | |
branches: | |
- "develop" | |
- "feature/ci" | |
concurrency: | |
group: ${{ github.ref }}-cache | |
cancel-in-progress: true | |
jobs: | |
# idea credit: https://github.com/nix-community/nix-github-actions/blob/bfeb681177b5128d061ebbef7ded30bc21a3f135/.github/workflows/detsys-nix-installer-action.yml | |
matrix: | |
name: Calculate recent-versions matrix | |
runs-on: ubuntu-latest | |
outputs: | |
calculated: ${{ steps.set-matrix.outputs.matrix }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Nix | |
uses: DeterminateSystems/nix-installer-action@v9 | |
with: | |
diagnostic-endpoint: "" | |
- name: Set Matrix | |
id: set-matrix | |
run: | | |
set -eux -o pipefail | |
echo "matrix=$(nix eval --json '.#lib.recentMatrix')" >> "$GITHUB_OUTPUT" | |
packages: | |
name: Cache ${{ matrix.elixir }} on OTP ${{ matrix.erlang }} | |
needs: matrix | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: ${{ fromJSON(needs.matrix.outputs.calculated) }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Nix | |
uses: DeterminateSystems/nix-installer-action@v9 | |
with: | |
diagnostic-endpoint: "" | |
- uses: DeterminateSystems/magic-nix-cache-action@v3 | |
with: | |
diagnostic-endpoint: "" | |
- uses: cachix/cachix-action@v14 | |
if: github.ref == 'refs/heads/develop' | |
with: | |
name: shanesveller-nix-beam-flakes | |
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}" | |
pathsToPush: "./result" | |
skipAddingSubstituter: true | |
- run: | | |
printf \ | |
"elixir %s\nerlang %s" \ | |
${{ matrix.elixir }} \ | |
${{ matrix.erlang }} \ | |
| tee ./dev/example/.tool-versions | |
- run: nix -L build .#example |