-
-
Notifications
You must be signed in to change notification settings - Fork 47
executable file
·36 lines (34 loc) · 1.22 KB
/
dispatch-rebottle-all.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
name: Dispatch rebottle all
on:
workflow_dispatch:
inputs:
extension:
description: Extension name
required: true
issue:
description: Issue number, where comment on failure would be posted
required: false
upload:
description: Whether to upload built bottles or not
required: false
jobs:
dispatch:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
- name: ${{github.event.inputs.formula}}
id: print_details
run: |
echo sender=${{github.event.sender.login}}
echo extension=${{github.event.inputs.extension}}
echo issue=${{github.event.inputs.issue}}
echo upload=${{github.event.inputs.upload}}
- name: Dispatch
run: |
json_array=()
extension=${{github.event.inputs.extension}}
for formula in ./Formula/$extension@*.rb; do
json="{\"formula\": \"$(basename ${formula%.*})\", \"issue\":\"${{github.event.inputs.issue}}\", \"upload\":\"${{github.event.inputs.upload}}\"}"
echo $json | GITHUB_TOKEN=${{ secrets.HOMEBREW_GITHUB_API_TOKEN }} gh workflow run dispatch-rebottle.yml --json
done