-
Notifications
You must be signed in to change notification settings - Fork 5
47 lines (41 loc) · 1.32 KB
/
Update-Tap.yml
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
45
46
47
name: Update Tap
run-name: "Update Tap #${{ github.run_number }}"
on:
workflow_run:
workflows: [Build documentation]
types: [completed]
workflow_dispatch:
jobs:
update-tap:
name: Update Tap
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
repository: juraj-hrivnak/homebrew-pakku
ref: main
token: ${{ secrets.PUSH_ACCESS_TOKEN }}
- name: Setup Git config
run: |
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
- name: Get Form
shell: bash
run: |
# Create 'New_Formula' directory
[ -d 'New_Formula/' ] || mkdir -p New_Formula/
# Download formula
curl https://juraj-hrivnak.github.io/Pakku/install/pakku.rb -o New_Formula/pakku.rb
- name: Make changes and commit
run: |
if cmp --silent -- "New_Formula/pakku.rb" "Formula/pakku.rb"; then
echo "file contents are identical"
else
echo "files differ"
rm Formula/pakku.rb
cp New_Formula/pakku.rb Formula/pakku.rb
git add Formula/pakku.rb
git commit -m 'Update formula'
git push origin main
fi