-
Notifications
You must be signed in to change notification settings - Fork 1
50 lines (47 loc) · 1.77 KB
/
bump_formula.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: Bump Homebrew formula
on:
repository_dispatch:
types: [update-formula]
workflow_dispatch:
inputs:
formula_version:
description: "Version of the formula"
required: true
type: string
formula_name:
description: "Name of the formula"
required: true
type: string
formula_url:
description: "URL of the formula"
required: true
type: string
sha256:
description: "SHA256 of the formula"
required: true
type: string
jobs:
homebrew:
name: Bump Homebrew formula
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout Source Repository
uses: actions/checkout@v4
- uses: mislav/bump-homebrew-formula-action@v3
with:
formula-name: ${{env.FORMULA_NAME}}
formula-path: Formula/${{env.FORMULA_NAME}}.rb
download-url: ${{ env.FORMULA_URL }}
homebrew-tap: ArjanCodes/homebrew-core
tag-name: ${{env.FORMULA_VERSION}}
base-branch: main
commit-message: ${{env.FORMULA_NAME}} ${{env.FORMULA_VERSION}}
env:
# COMMITTER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
FORMULA_VERSION: ${{ github.event_name == 'repository_dispatch' && github.event.client_payload.formula_version || inputs.formula_version}}
FORMULA_NAME: ${{ github.event_name == 'repository_dispatch' && github.event.client_payload.formula_name || inputs.formula_name}}
FORMULA_URL: ${{ github.event_name == 'repository_dispatch' && github.event.client_payload.formula_url || inputs.formula_url}}
SHA256: ${{ github.event_name == 'repository_dispatch' && github.event.client_payload.sha256 || inputs.sha256}}