Skip to content

ci(cachix): push only resulting packages without vendored deps #2

ci(cachix): push only resulting packages without vendored deps

ci(cachix): push only resulting packages without vendored deps #2

Workflow file for this run

name: "Flake-managed workflow"
on:
pull_request:
push:
jobs:
config:
runs-on: ubuntu-latest
outputs:
config: ${{ steps.config.outputs.config }}
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v29
- id: config
name: Get config from the flake
run: |
printf 'config=' >> "$GITHUB_OUTPUT"
nix eval --json .#githubActions.config >> "$GITHUB_OUTPUT"
check:
needs: config
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v29
- run: nix flake check --all-systems --no-build
if: ${{ fromJSON(needs.config.outputs.config).checkAllSystems }}
- run: nix flake check --no-build
if: ${{ ! fromJSON(needs.config.outputs.config).checkAllSystems }}
build:
needs: config
strategy:
matrix:
include: ${{ fromJSON(needs.config.outputs.config).matrix }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v29
- uses: cachix/cachix-action@v15
if: ${{ matrix.enableCachix }}
with:
name: ${{ fromJSON(needs.config.outputs.config).cacheName }}
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
pathsToPush: ${{ matrix.pathsToPush }}
skipPush: ${{ matrix.skipPush }}
- run: |
nix-build --no-link --keep-going --expr '{ system }: (builtins.getFlake (toString ./.)).githubActions.target.${system}' --argstr system ${{ matrix.double }}