resume/.github/workflows/build.yml
Alejandro Angulo 8049997f37
Fixed copypasta
Copied over from a different repo and I forgot to change the cachix repo
name.
2024-04-27 22:30:06 -07:00

35 lines
1,003 B
YAML

name: "Build"
on: [pull_request, push]
jobs:
pre-commit-hooks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: cachix/install-nix-action@v22
- uses: cachix/cachix-action@v12
with:
name: devenv
- uses: cachix/cachix-action@v12
with:
name: alejandr0angul0-resume
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
- name: Run pre-commit hooks
run: |
git fetch origin
nix develop --accept-flake-config --impure --command bash -c \
"pre-commit run --from-ref origin/main --to-ref $GITHUB_SHA"
build:
needs: pre-commit-hooks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: cachix/install-nix-action@v25
- uses: cachix/cachix-action@v14
with:
name: alejandr0angul0-resume
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- run: nix build
- run: nix flake check
- run: nix run