Update homebrew formula #133
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Update homebrew formula" | |
on: | |
schedule: | |
# every 1st and 3rd Monday of the month at 9am UTC | |
- cron: '0 9 1-7,15-21 * 1' | |
workflow_dispatch: {} | |
push: | |
branches: | |
- main | |
paths: | |
- '.github/workflows/update-formulae.yaml' | |
concurrency: | |
## pr gets single group, otherwise one per sha (unique groups means they can run in parallel) | |
# group: ${{ github.workflow }}-${{ github.event_name.pull_request && github.event.pull_request.number || github.sha }} | |
# one at a time on a branch | |
group: ${{ github.workflow }}-${{ github.ref_name }} | |
# only cancel-in-progress on non-default branches | |
cancel-in-progress: ${{ github.ref_name != github.event.repository.default_branch }} | |
jobs: | |
update-brew-tap: | |
permissions: | |
contents: write | |
pull-requests: write | |
runs-on: ubuntu-latest | |
steps: | |
- name: '[Debug] print github context with proper escaping' | |
env: | |
GITHUB_CONTEXT: ${{ toJson(github) }} | |
run: | | |
echo "$GITHUB_CONTEXT" | |
- uses: actions/checkout@v4 | |
- id: list-formulae | |
name: List all formulae in this tap | |
run: | | |
# list all homebrew formula in ./Formula/, delimited by comma | |
echo "formulae=$(find ./Formula/ -name "*.rb" -exec basename -s .rb {} \; | paste -sd, -)" >> "$GITHUB_OUTPUT" | |
- name: Update Homebrew formula | |
uses: nsheaps/action-homebrew-bump-formula@master | |
with: | |
# Required, custom personal GitHub access token with only the 'public_repo' scope enabled | |
token: ${{ github.token }} | |
# Bump all outdated formulae in this tap | |
tap: nsheaps/homebrew-devsetup | |
# Bump only these formulae if outdated | |
formula: ${{ steps.list-formulae.outputs.formulae }} | |
# Optional, if don't want to check for already open PRs | |
force: true | |
# Need to set this input if want to use `brew livecheck` | |
livecheck: true | |
# use origin repository | |
no_fork: true |