mirror of
https://github.com/RayLabsHQ/gitea-mirror.git
synced 2026-03-13 22:12:54 +03:00
51 lines
1.1 KiB
YAML
51 lines
1.1 KiB
YAML
name: Nix Flake Check
|
|
|
|
on:
|
|
push:
|
|
branches: [main, nix]
|
|
tags:
|
|
- 'v*'
|
|
paths:
|
|
- 'flake.nix'
|
|
- 'flake.lock'
|
|
- 'bun.nix'
|
|
- '.github/workflows/nix-build.yml'
|
|
pull_request:
|
|
branches: [main]
|
|
paths:
|
|
- 'flake.nix'
|
|
- 'flake.lock'
|
|
- 'bun.nix'
|
|
- '.github/workflows/nix-build.yml'
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
check:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 45
|
|
env:
|
|
NIX_CONFIG: |
|
|
accept-flake-config = true
|
|
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Install Nix
|
|
uses: DeterminateSystems/nix-installer-action@main
|
|
|
|
- name: Setup Nix Cache
|
|
uses: DeterminateSystems/magic-nix-cache-action@main
|
|
|
|
- name: Check flake
|
|
run: nix flake check --accept-flake-config
|
|
|
|
- name: Show flake info
|
|
run: nix flake show --accept-flake-config
|
|
|
|
- name: Build package
|
|
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')
|
|
run: nix build --print-build-logs --accept-flake-config
|