summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorseth <[email protected]>2023-05-25 15:25:38 -0400
committerseth <[email protected]>2023-05-25 15:25:38 -0400
commite4bf07e8d8c24966088268f750742dc77c5d5db1 (patch)
tree7cad50d79fcf1f03e00c5af1b8b2c22fde30c318
parent82b19b36568b53cb97cb2cfec5e71a951429e51e (diff)
actions: add update-inputs workflow
-rw-r--r--.github/workflows/checkandformat.yml41
-rw-r--r--.github/workflows/update-inputs.yaml31
2 files changed, 31 insertions, 41 deletions
diff --git a/.github/workflows/checkandformat.yml b/.github/workflows/checkandformat.yml
deleted file mode 100644
index 8560ae7..0000000
--- a/.github/workflows/checkandformat.yml
+++ /dev/null
@@ -1,41 +0,0 @@
-name: check and format flake
-
-on:
- #pull_request:
- # paths:
- # - "**.nix"
- #push:
- # paths:
- # - "**.nix"
- workflow_dispatch:
-
-jobs:
- check:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v3
-
- - uses: cachix/install-nix-action@v19
- with:
- github_access_token: ${{ secrets.GITHUB_TOKEN }}
-
- - run: |
- export NIXPKGS_ALLOW_UNSUPPORTED_SYSTEM=1
- export NIXPKGS_ALLOW_BROKEN=1
- nix flake check --impure
- format:
- if: ${{ github.event_name == 'push' }}
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v3
-
- - uses: cachix/install-nix-action@v19
- with:
- github_access_token: ${{ secrets.GITHUB_TOKEN }}
-
- - run: nix fmt
-
- - uses: EndBug/add-and-commit@v9
- with:
- default_author: github_actions
- message: "chore: format flake"
diff --git a/.github/workflows/update-inputs.yaml b/.github/workflows/update-inputs.yaml
new file mode 100644
index 0000000..04803cb
--- /dev/null
+++ b/.github/workflows/update-inputs.yaml
@@ -0,0 +1,31 @@
+name: update inputs
+
+on:
+ schedule:
+ # run every saturday
+ - cron: "0 0 * * 6"
+ workflow_dispatch:
+
+permissions:
+ contents: write
+
+jobs:
+ update-lock:
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: checkout repo
+ uses: actions/checkout@v3
+
+ - name: install nix
+ uses: cachix/install-nix-action@v20
+ with:
+ github_access_token: ${{ secrets.GITHUB_TOKEN }}
+
+ - name: update all inputs
+ uses: DeterminateSystems/update-flake-lock@v19
+ with:
+ commit-msg: "flake: update inputs"
+ pr-title: "flake: update all inputs"
+ nix-options: "--accept-flake-config"
+ token: ${{ secrets.GITHUB_TOKEN }}