2023-10-10 18:12:59 +02:00
|
|
|
name: LNbits CI / nix
|
|
|
|
|
2023-12-19 11:54:14 +01:00
|
|
|
# - run : on main, dev, nix and cachix branches when relevant files change
|
|
|
|
# - cache : on main, dev and cachix branches when relevant files change
|
|
|
|
|
2023-10-10 18:12:59 +02:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
2023-10-16 13:24:13 +02:00
|
|
|
- main
|
|
|
|
- dev
|
2023-12-19 11:54:14 +01:00
|
|
|
- nix
|
|
|
|
- cachix
|
2023-10-10 18:12:59 +02:00
|
|
|
paths:
|
|
|
|
- 'flake.nix'
|
|
|
|
- 'flake.lock'
|
|
|
|
- 'pyproject.toml'
|
|
|
|
- 'poetry.lock'
|
2023-12-19 11:54:14 +01:00
|
|
|
- '.github/workflows/nix.yml'
|
2023-10-10 18:12:59 +02:00
|
|
|
pull_request:
|
|
|
|
paths:
|
|
|
|
- 'flake.nix'
|
|
|
|
- 'flake.lock'
|
|
|
|
- 'pyproject.toml'
|
|
|
|
- 'poetry.lock'
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
nix:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-12-19 11:54:14 +01:00
|
|
|
- uses: actions/checkout@v4
|
2024-08-01 21:54:15 +02:00
|
|
|
- uses: cachix/install-nix-action@v27
|
2023-12-19 11:54:14 +01:00
|
|
|
with:
|
2024-08-01 21:54:15 +02:00
|
|
|
nix_path: nixpkgs=channel:nixos-24.05
|
|
|
|
- uses: cachix/cachix-action@v15
|
2023-10-16 13:24:13 +02:00
|
|
|
with:
|
2023-12-19 11:54:14 +01:00
|
|
|
name: lnbits
|
|
|
|
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
|
|
|
|
- run: nix build -L
|
|
|
|
- run: cachix push lnbits ./result
|
|
|
|
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/cachix'
|