-
-
Notifications
You must be signed in to change notification settings - Fork 1
44 lines (37 loc) · 1.26 KB
/
sync.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
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 }}