From be442dd9d58404d1abaad884cf9e9b4dce94136d Mon Sep 17 00:00:00 2001 From: Plopmenz Date: Tue, 17 Feb 2026 15:44:35 +0100 Subject: [PATCH] automated updates --- .github/workflows/cache.yml | 12 ++++++------ .github/workflows/test.yml | 19 ++++++++++++++++++ .github/workflows/update.yml | 38 ++++++++++++++++++++++++++++++++++++ 3 files changed, 63 insertions(+), 6 deletions(-) create mode 100644 .github/workflows/test.yml create mode 100644 .github/workflows/update.yml diff --git a/.github/workflows/cache.yml b/.github/workflows/cache.yml index 647d589..0b013c2 100644 --- a/.github/workflows/cache.yml +++ b/.github/workflows/cache.yml @@ -3,7 +3,7 @@ name: Cache on: push: branches: - - main + - cache jobs: build-and-upload: @@ -11,18 +11,18 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Install Nix - uses: cachix/install-nix-action@v27 + uses: cachix/install-nix-action@v31 with: - nix_path: nixpkgs=channel:nixos-24.11 + nix_path: nixpkgs=channel:nixos-unstable - name: Connect to Cachix - uses: cachix/cachix-action@v14 + uses: cachix/cachix-action@v16 with: name: openmesh authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} - name: Upload derivation to Cachix - run: nix build | cachix push openmesh + run: nix build --accept-flake-config --print-out-paths --fallback | cachix push openmesh diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..b07509d --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,19 @@ +name: Test + +on: pull_request + +jobs: + update: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v6 + + - name: Install Nix + uses: cachix/install-nix-action@v31 + with: + nix_path: nixpkgs=channel:nixos-unstable + + - name: Output version + run: nix run . --accept-flake-config -- -V diff --git a/.github/workflows/update.yml b/.github/workflows/update.yml new file mode 100644 index 0000000..ce04095 --- /dev/null +++ b/.github/workflows/update.yml @@ -0,0 +1,38 @@ +name: Update + +on: + schedule: + - cron: "0 0 * * *" + workflow_dispatch: + +permissions: + contents: write + +jobs: + update: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v6 + with: + ref: cache + + - name: Install Nix + uses: cachix/install-nix-action@v31 + with: + nix_path: nixpkgs=channel:nixos-unstable + + - name: Update flake inputs + run: nix flake update + + - name: Update package version + run: nix run github:Mic92/nix-update default -- --flake + + - name: Commit and push + run: | + git config user.name "github-actions[bot]" + git config user.email "41898282+github-actions[bot]@users.noreply.github.com" + git add . + git commit -m "Automated update" + git push