From 75be3b3207f35e481887c7c578f0d5d33224b33e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torjus=20H=C3=A5kestad?= Date: Thu, 3 Oct 2024 21:43:34 +0200 Subject: [PATCH] Add workflows --- .github/workflows/flake-check.yaml | 14 ++++++++++++++ .github/workflows/flake-update.yaml | 25 +++++++++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 .github/workflows/flake-check.yaml create mode 100644 .github/workflows/flake-update.yaml diff --git a/.github/workflows/flake-check.yaml b/.github/workflows/flake-check.yaml new file mode 100644 index 0000000..93c4acb --- /dev/null +++ b/.github/workflows/flake-check.yaml @@ -0,0 +1,14 @@ +name: Run nix flake check +on: + push: + pull_request: + +jobs: + flake-check: + runs-on: ubuntu-latest + container: + image: ghcr.io/catthehacker/ubuntu:runner-latest + steps: + - uses: actions/checkout@v3 + - uses: cachix/install-nix-action@v27 + - run: nix flake check diff --git a/.github/workflows/flake-update.yaml b/.github/workflows/flake-update.yaml new file mode 100644 index 0000000..3d2d1c8 --- /dev/null +++ b/.github/workflows/flake-update.yaml @@ -0,0 +1,25 @@ +--- +name: Periodic flake update +on: # yamllint disable-line rule:truthy + schedule: + - cron: "0 0 * * *" + +permissions: + contents: write + +jobs: + flake-update: + runs-on: ubuntu-latest + container: + image: ghcr.io/catthehacker/ubuntu:runner-latest + steps: + - uses: actions/checkout@v3 + - uses: cachix/install-nix-action@v27 + - name: configure git + run: | + git config --global user.name 'torjus-bot' + git config --global user.email 'torjus-bot@git.t-juice.club' + - name: flake update + run: nix flake update --commit-lock-file + - name: push + run: git push