sync-homebrew-core #2
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: sync-homebrew-core | |
on: | |
schedule: | |
- cron: '0 18 * * 1' | |
workflow_dispatch: | |
jobs: | |
create-pr: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- run: | | |
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" | |
formulae=( | |
"bzip2" | |
"unzip" | |
"xz" | |
) | |
for formula in "${formulae[@]}"; do | |
brew cat unzip > "Formula/$formula" | |
done | |
- uses: coatl-dev/actions/simple-git-diff@coatl | |
id: git-diff | |
- if: ${{ success() && steps.git-diff.outputs.diff == 'true' }} | |
uses: coatl-dev/actions/gpg-import@coatl | |
with: | |
passphrase: ${{ secrets.COATL_BOT_GPG_PASSPHRASE }} | |
private-key: ${{ secrets.COATL_BOT_GPG_PRIVATE_KEY }} | |
- if: ${{ success() && steps.git-diff.outputs.diff == 'true' }} | |
run: | | |
git checkout -B coatl-bot-homebrew-core-sync | |
git add --all | |
git commit -m "formula: sync homebrew-core formulae" | |
git push --force --set-upstream origin coatl-bot-homebrew-core-sync | |
- if: ${{ success() && steps.git-diff.outputs.diff == 'true' }} | |
uses: coatl-dev/actions/create-pr@coatl | |
with: | |
gh-token: ${{ secrets.COATL_BOT_GH_TOKEN }} |