Skip to content

Commit

Permalink
Merge pull request #520 from Homebrew/bump-packages-fork-input
Browse files Browse the repository at this point in the history
bump-packages: add `fork` input
  • Loading branch information
Bo98 committed Apr 3, 2024
2 parents a68b115 + bbcc662 commit 838e85b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
4 changes: 3 additions & 1 deletion bump-packages/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,6 @@ If there are no outdated packages, the Action will just exit.
CASK-2
CASKS-3
...
```
# Do not use a fork for opening PR's
fork: false
```
16 changes: 10 additions & 6 deletions bump-packages/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,29 @@ inputs:
description: Cask names, one per line
required: false
default: ''
fork:
description: Use a fork when opening a PR
required: false
default: ${{ github.repository_owner != "Homebrew" }}
runs:
using: composite
steps:
- run: |
if [[ "${GITHUB_REPOSITORY_OWNER}" == 'Homebrew' ]]; then
brew bump --no-fork --open-pr --formulae ${{ inputs.formulae }}
else
if [[ "$INPUT_FORK" == "true" ]]; then
brew bump --open-pr --formulae ${{ inputs.formulae }}
else
brew bump --no-fork --open-pr --formulae ${{ inputs.formulae }}
fi
shell: bash
if: inputs.formulae != ''
env:
HOMEBREW_DEVELOPER: "1"
HOMEBREW_GITHUB_API_TOKEN: ${{ inputs.token }}
- run: |
if [[ "${GITHUB_REPOSITORY_OWNER}" == 'Homebrew' ]]; then
brew bump --no-fork --open-pr --casks ${{ inputs.casks }}
else
if [[ "$INPUT_FORK" == "true" ]]; then
brew bump --open-pr --casks ${{ inputs.casks }}
else
brew bump --no-fork --open-pr --casks ${{ inputs.casks }}
fi
shell: bash
if: inputs.casks != ''
Expand Down

0 comments on commit 838e85b

Please sign in to comment.