Skip to content

Commit

Permalink
Add workflows and gitignore
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnRTitor committed Mar 17, 2024
1 parent 473c99e commit dbf8715
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/check-flake.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: check-flake

on: [push, pull_request, workflow_dispatch]

jobs:
checks:
name: Check expressions
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v25
with:
install_url: https://nixos.org/nix/install
extra_nix_config: |
auto-optimise-store = true
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
experimental-features = nix-command flakes
- run: nix flake check
21 changes: 21 additions & 0 deletions .github/workflows/update-flake.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: update-flake-lock
on:
workflow_dispatch: # allows manual triggering
schedule:
- cron: '0 0 * * *' # runs weekly on Sunday at 00:00
push:
paths:
- 'flake.nix'
jobs:
lockfile:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Nix
uses: cachix/install-nix-action@v25
with:
extra_nix_config: |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
- name: Update flake.lock
uses: DeterminateSystems/update-flake-lock@v21
19 changes: 19 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Ignore everything
*

# But don't ignore folders
!*/

# But don't ignore these types of files
!*.nix
!*.yml
!*.lock

# Don't ignore the README
!README.md

# Don't ignore LICENSE and github actions
!LICENSE
!.github/workflows

# Ignore files larger than 100M

0 comments on commit dbf8715

Please sign in to comment.