Skip to content

Commit

Permalink
feat: add CI to detect references
Browse files Browse the repository at this point in the history
  • Loading branch information
SMillerDev committed Feb 11, 2024
1 parent f070fab commit 1ced60b
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/check-reference.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Check patch references

on:
push:
branches-ignore:
- dependabot/**
schedule:
# Once every day at midnight UTC
- cron: "0 0 * * *"

jobs:
stale:
runs-on: ubuntu-latest
steps:
- name: Checkout patches
uses: actions/checkout@v4

- name: Checkout core
uses: actions/checkout@v4
with:
repository: 'homebrew/homebrew-core'
path: homebrew-core

- name: Detect references
run: |
patches=$(find -name "*.patch")
status=0
for patch in $patches; do
if ! git -C "homebrew-core" grep -r "${patch/./}" > /dev/null; then
echo "$patch not needed!"
status=1
fi
done
exit $status

0 comments on commit 1ced60b

Please sign in to comment.