2023-02-12 18:02:14 +00:00
|
|
|
name: "Build"
|
2024-04-25 03:35:54 +00:00
|
|
|
on: [pull_request, push]
|
2023-02-12 18:02:14 +00:00
|
|
|
jobs:
|
2023-02-13 18:18:39 +00:00
|
|
|
pre-commit-hooks:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
2024-04-28 05:23:09 +00:00
|
|
|
- uses: cachix/install-nix-action@v22
|
|
|
|
- uses: cachix/cachix-action@v12
|
2023-02-13 18:18:39 +00:00
|
|
|
with:
|
2024-04-28 05:23:09 +00:00
|
|
|
name: devenv
|
|
|
|
- uses: cachix/cachix-action@v12
|
2023-02-13 18:18:39 +00:00
|
|
|
with:
|
2024-04-28 05:23:09 +00:00
|
|
|
name: alejandr0angul0-dev
|
|
|
|
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
|
2023-02-13 18:18:39 +00:00
|
|
|
- name: Run pre-commit hooks
|
2024-04-28 05:23:09 +00:00
|
|
|
run: |
|
|
|
|
git fetch origin
|
|
|
|
nix develop --accept-flake-config --impure --command bash -c \
|
|
|
|
"pre-commit run --from-ref origin/main --to-ref $GITHUB_SHA"
|
2024-04-25 03:47:49 +00:00
|
|
|
|
|
|
|
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
|