resume/.github/workflows/build.yml
Alejandro Angulo 88637aaae4
Changed lint job to use nix develop
Since the pre-commit hooks are managed by devenv, the
`.pre-commit-config.yaml` file isn't part of the repo anymore (it's
generated by devenv).
2024-04-27 22:23:09 -07:00

35 lines
1,000 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-dev
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