Skip to content

Dispatch rebottle all #84

Dispatch rebottle all

Dispatch rebottle all #84

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@v4
- name: ${{github.event.inputs.extension}}
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: |
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