-
Notifications
You must be signed in to change notification settings - Fork 58
41 lines (35 loc) · 1.14 KB
/
generate-help-output.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
name: Generate --help output
# Generate `brew autoupdate --help output` for the README.md file
on:
push:
permissions:
contents: write
jobs:
generate-help-output:
name: Generate --help output
runs-on: macos-latest
steps:
- name: Set up Homebrew
id: set-up-homebrew
uses: Homebrew/actions/setup-homebrew@master
with:
debug: false
test-bot: false
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: ${{ github.ref_name }}
- name: Install Python
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
with:
python-version: '3'
- name: Update README.md
id: generate
run: python .github/generate-help-output.py
- name: Commit changes
if: steps.generate.outputs.changed == 'true'
run: |
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config user.name "github-actions[bot]"
git commit -am "Update README.md with --help output"
git push