-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
50 lines (44 loc) · 1.3 KB
/
autogenerated-files.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: Autogenerated files check
on:
pull_request:
paths:
- .github/workflows/autogenerated-files.yml
- README.md
- completions/**
- docs/Manpage.md
- manpages/brew.1
permissions:
contents: read
env:
HOMEBREW_DEVELOPER: 1
HOMEBREW_NO_AUTO_UPDATE: 1
jobs:
autogenerated:
runs-on: ubuntu-22.04
if: github.repository == 'Homebrew/brew'
steps:
- name: Set up Homebrew
id: set-up-homebrew
uses: Homebrew/actions/setup-homebrew@master
with:
core: false
cask: false
test-bot: true
- name: Cache Bundler RubyGems
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4
with:
path: ${{ steps.set-up-homebrew.outputs.gems-path }}
key: ${{ runner.os }}-rubygems-${{ steps.set-up-homebrew.outputs.gems-hash }}
restore-keys: ${{ runner.os }}-rubygems-
- name: Check for changes to autogenerated files
id: check
run: |
if brew generate-man-completions
then
echo "This PR modifies autogenerated files!" >&2
echo "Please ensure their source files are updated and then run the following:
brew generate-man-completions" >&2
exit 1
else
exit 0
fi