From e4bf07e8d8c24966088268f750742dc77c5d5db1 Mon Sep 17 00:00:00 2001 From: seth Date: Thu, 25 May 2023 15:25:38 -0400 Subject: actions: add update-inputs workflow --- .github/workflows/checkandformat.yml | 41 ------------------------------------ .github/workflows/update-inputs.yaml | 31 +++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 41 deletions(-) delete mode 100644 .github/workflows/checkandformat.yml create mode 100644 .github/workflows/update-inputs.yaml 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 }} -- cgit v1.2.3