Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: check for changes to autogenerated files #14772

Merged
merged 1 commit into from Feb 23, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
46 changes: 46 additions & 0 deletions .github/workflows/autogenerated-files.yml
@@ -0,0 +1,46 @@
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

- name: Cache Bundler RubyGems
uses: actions/cache@v1
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