From 3db69b73c8d3b76ff2e9b8820006677526dde727 Mon Sep 17 00:00:00 2001
From: zowoq <59103226+zowoq@users.noreply.github.com>
Date: Fri, 10 Mar 2023 08:17:50 +1000
Subject: [PATCH] add update hound action

---
 .github/workflows/hound.yml | 38 +++++++++++++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)
 create mode 100644 .github/workflows/hound.yml

diff --git a/.github/workflows/hound.yml b/.github/workflows/hound.yml
new file mode 100644
index 0000000..98fcf6a
--- /dev/null
+++ b/.github/workflows/hound.yml
@@ -0,0 +1,38 @@
+name: "Update hound"
+
+on:
+  repository_dispatch:
+  workflow_dispatch:
+  schedule:
+    - cron: "51 2 * * 3"
+
+jobs:
+  createPullRequest:
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v3
+      - name: Install Nix
+        uses: cachix/install-nix-action@v20
+        with:
+          extra_nix_config: |
+            experimental-features = nix-command flakes
+      - name: Setup
+        id: setup
+        run: |
+          echo "title=hound: update repos $(date -u +"%Y-%m-%d")" >> $GITHUB_OUTPUT
+          git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
+          git config user.name "github-actions[bot]"
+      - name: Update hound repos
+        env:
+          # avoid the repo update script being rate limited
+          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+        run: |
+          ./inv update-hound-repos
+      - uses: peter-evans/create-pull-request@v4
+        with:
+          body: |
+            Automated update of hound repos
+          branch: update-hound
+          delete-branch: false
+          title: ${{ steps.setup.outputs.title }}
+          token: ${{ secrets.GITHUB_TOKEN }}