Skip to content

Workflow: Add repo dispatch jobs #1

Workflow: Add repo dispatch jobs

Workflow: Add repo dispatch jobs #1

name: Update Homebrew Formula (Dispatch)

Check failure on line 1 in .github/workflows/update-formula.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/update-formula.yml

Invalid workflow file

Invalid type for `job.environment`
on:
workflow_dispatch:
inputs:
version:
description: 'Bumgr version used in the Formula'
required: true
permissions:
contents: read
jobs:
dispatch-homebrew-update:
name: Dispatch Homebrew update
needs:
- publish
runs-on: ubuntu-latest
environment:
repo: '3j14/homebrew-bumgr'
data: '{"event_type": "update", "client_payload": {"version": "${{ github.event.inputs.version }}"}'
timeout-minutes: 1
steps:
- name: Dispatch Homebrew update
run: |
curl -H "Accept: application/vnd.github.everest-preview+json" \
-H "Authorization: token ${{ secrets.HOMEBREW_BUMGR_DISPATCH_PAT }}" \
--request POST \
--data $data https://api.github.com/repos/$repo/dispatches