forked from Homebrew/homebrew-core
-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (61 loc) · 2.52 KB
/
publish-commit-bottles.yml
File metadata and controls
64 lines (61 loc) · 2.52 KB
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: Publish and commit bottles
on:
repository_dispatch:
types:
- 'Publish *'
jobs:
upload:
runs-on: ubuntu-latest
env:
HOMEBREW_DEVELOPER: 1
HOMEBREW_FORCE_HOMEBREW_ON_LINUX: 1
HOMEBREW_NO_ANALYTICS: 1
HOMEBREW_NO_AUTO_UPDATE: 1
steps:
- name: Post comment once started
uses: Homebrew/actions/post-comment@master
with:
token: ${{secrets.HOMEBREW_GITHUB_API_TOKEN}}
issue: ${{github.event.client_payload.pull_request}}
body: ':shipit: @${{github.actor}} has [triggered a merge](${{github.event.repository.html_url}}/actions/runs/${{github.run_id}}).'
bot_body: ':robot: A scheduled task has [triggered a merge](${{github.event.repository.html_url}}/actions/runs/${{github.run_id}}).'
bot: BrewTestBot
- name: Update Homebrew
run: |
brew update-reset $(brew --repository)
- name: Checkout tap
uses: actions/checkout@v2
with:
token: ${{secrets.HOMEBREW_GITHUB_API_TOKEN}}
fetch-depth: 0
- name: Setup tap
run: |
rm -rf $(brew --repository ${{github.repository}})
ln -s $GITHUB_WORKSPACE $(brew --repository ${{github.repository}})
- name: Setup git
uses: Homebrew/actions/git-user-config@master
- name: Pull bottles
env:
HOMEBREW_GITHUB_API_TOKEN: ${{secrets.HOMEBREW_GITHUB_API_TOKEN}}
HOMEBREW_BINTRAY_USER: brewtestbot
HOMEBREW_BINTRAY_KEY: ${{secrets.HOMEBREW_BINTRAY_KEY}}
run: |
brew pr-pull --verbose ${{github.event.client_payload.pull_request}}
- name: Push commits
uses: Homebrew/actions/git-try-push@master
- name: Post comment on failure
if: ${{!success()}}
uses: Homebrew/actions/post-comment@master
with:
token: ${{secrets.HOMEBREW_GITHUB_API_TOKEN}}
issue: ${{github.event.client_payload.pull_request}}
body: ':warning: @${{github.actor}} bottle publish [failed](${{github.event.repository.html_url}}/actions/runs/${{github.run_id}}).'
bot_body: ':warning: Bottle publish [failed](${{github.event.repository.html_url}}/actions/runs/${{github.run_id}}).'
bot: BrewTestBot
- name: Dismiss approvals on failure
if: ${{!success()}}
uses: Homebrew/actions/dismiss-approvals@master
with:
token: ${{secrets.HOMEBREW_GITHUB_API_TOKEN}}
pr: ${{github.event.client_payload.pull_request}}
message: 'bottle publish failed'