fix(ci): use lix in github actions #40

Merged
jalil merged 1 commit from gha-use-lix into main 2024-07-29 09:53:45 +02:00

View file

@ -12,38 +12,47 @@ on:
jobs: jobs:
check: check:
runs-on: ubuntu-22.04 runs-on: ubuntu-latest
container:
image: ghcr.io/lix-project/lix:latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@v12 - name: Enable flakes
run: echo 'experimental-features = nix-command flakes' >> ~/.config/nix/nix.conf
- uses: DeterminateSystems/magic-nix-cache-action@v7 - uses: DeterminateSystems/magic-nix-cache-action@v7
- name: Run `nix flake check` - name: Run `nix flake check`
run: | run: |
nix flake check nix flake check --verbose --keep-going
nix run nixpkgs#statix -- check . nix run nixpkgs#statix -- check .
lockfile: lockfile:
runs-on: ubuntu-22.04 runs-on: ubuntu-latest
container:
image: ghcr.io/lix-project/lix:latest
needs: check needs: check
if: ${{ github.event_name == 'schedule' }} # only run when scheduled if: ${{ github.event_name == 'schedule' }} # only run when scheduled
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@v12 - name: Enable flakes
run: echo 'experimental-features = nix-command flakes' >> ~/.config/nix/nix.conf
- uses: DeterminateSystems/update-flake-lock@v23 - uses: DeterminateSystems/update-flake-lock@v23
- name: Run `nix flake check` - name: Run `nix flake check`
run: nix flake check run: nix flake check --verbose --keep-going
build-documentation: build-documentation:
runs-on: ubuntu-latest runs-on: ubuntu-latest
container:
image: ghcr.io/lix-project/lix:latest
if: ${{ github.event_name != 'schedule' }} # only run when not scheduled if: ${{ github.event_name != 'schedule' }} # only run when not scheduled
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@v12 - name: Enable flakes
- uses: DeterminateSystems/magic-nix-cache-action@v7 run: echo 'experimental-features = nix-command flakes' >> ~/.config/nix/nix.conf
- name: Build documentation - uses: DeterminateSystems/magic-nix-cache-action@v7
run: nix build .#docs --print-build-logs - name: Build documentation
- name: Upload artifact run: nix build .#docs --print-build-logs
uses: actions/upload-pages-artifact@v3 - name: Upload artifact
with: uses: actions/upload-pages-artifact@v3
path: ./result with:
path: ./result
deploy: deploy:
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: build-documentation needs: build-documentation