Skip to content

Update nax to 0.2.0

Update nax to 0.2.0 #4

name: Update Formula
run-name: Update ${{ github.event.client_payload.name }} to ${{ github.event.client_payload.version }}
on:
repository_dispatch:
types: [update-formula]
jobs:
update-formula:
runs-on: ubuntu-latest
env:
PAYLOAD: ${{ toJson(github.event.client_payload) }}
steps:
- uses: actions/checkout@v4
- run: |
ERB_ARGS=$(echo $PAYLOAD | jq -rj 'keys[] as $k | "\($k)=\(.[$k]) "')
erb $ERB_ARGS templates/${{ github.event.client_payload.name }}.erb >> Formula/${{ github.event.client_payload.name }}.rb
git config --global user.name "GitHub Actions"
git config --global user.email "actions@github.com"
git add -A
git commit -m "Update ${{ github.event.client_payload.name }} to ${{ github.event.client_payload.version }}"
git push