From 6988e0a1b233b0de4eae04d97906154ff89f0428 Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Sun, 20 Aug 2023 17:43:00 -0700 Subject: add a couple of github actions --- .github/dependabot.yml | 6 ++++++ .github/workflows/update.yml | 47 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/update.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..1230149 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,6 @@ +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "daily" diff --git a/.github/workflows/update.yml b/.github/workflows/update.yml new file mode 100644 index 0000000..3cf3414 --- /dev/null +++ b/.github/workflows/update.yml @@ -0,0 +1,47 @@ +name: Nix Autoupdater + +on: + workflow_dispatch: {} + schedule: + - cron: '0 0 * * *' + +jobs: + update-packages: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: cachix/install-nix-action@v22 + with: + extra_nix_config: | + access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} + accept-flake-config = true + - run: | + nix shell nixpkgs#git -c git config user.name 'NixBot' + nix shell nixpkgs#git -c git config user.email 'fcuny@users.noreply.github.com' + nix flake update + nix shell nixpkgs#git -c git commit -am "[Auto] update all inputs" + + - name: Create Pull Request + uses: peter-evans/create-pull-request@v5 + id: cpr + with: + commit-message: '[Auto] Package updates' + committer: GitHub + author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com> + signoff: false + branch: package-auto-updates + delete-branch: true + title: '[Auto] Package updates' + body: '' + labels: | + automated pr + assignees: fcuny + reviewers: fcuny + + - name: Enable Pull Request Automerge + if: steps.cpr.outputs.pull-request-operation == 'created' + uses: peter-evans/enable-pull-request-automerge@v3 + with: + token: ${{ secrets.MACHINE_USER_TOKEN }} + pull-request-number: ${{ steps.cpr.outputs.pull-request-number }} + merge-method: squash -- cgit 1.4.1