add update hound action

This commit is contained in:
zowoq 2023-03-10 08:17:50 +10:00
parent 3e811b3579
commit 3db69b73c8

38
.github/workflows/hound.yml vendored Normal file
View file

@ -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 }}