-
Notifications
You must be signed in to change notification settings - Fork 3
77 lines (75 loc) · 2.57 KB
/
main.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: JetBrains Cask Bot - Update
on:
workflow_dispatch:
push:
branches: '**'
# schedule:
# - cron: '*/30 * * * 1-5'
# - cron: '30 */4 * * 6,0'
jobs:
check_for_update:
name: Beepboop – check for update
runs-on: ubuntu-latest
outputs:
update-needed: ${{ steps.update-needed.outputs.update-needed }}
steps:
- name: Checking out the latest version
uses: actions/checkout@v1
- name: Install dependencies
shell: bash
run: yarn install --frozen-lockfile
- id: update-needed
env:
JCB_GITHUB_API_TOKEN: ${{ secrets.JCB_GITHUB_API_TOKEN }}
uses: ./.github/actions/needs_update
update_casks:
name: Beepboop – execute update
needs: check_for_update
if: needs.check_for_update.outputs.update-needed == 'true' || github.event_name == 'workflow_dispatch' || github.event_name == 'push'
runs-on: macos-10.15
env:
# Force vendored Ruby on Catalina: https://github.com/Homebrew/brew/issues/9410
HOMEBREW_FORCE_VENDOR_RUBY: 1
steps:
- name: Checking out the latest version
id: checkout
uses: actions/checkout@v1
- name: Set up Homebrew
id: set-up-homebrew
uses: Homebrew/actions/setup-homebrew@master
- name: Cache Homebrew Bundler RubyGems
id: cache
uses: actions/cache@v1
with:
path: ${{ steps.set-up-homebrew.outputs.gems-path }}
key: ${{ runner.os }}-rubygems-${{ steps.set-up-homebrew.outputs.gems-hash }}
restore-keys: ${{ runner.os }}-rubygems-
- name: Install Homebrew Bundler RubyGems
if: steps.cache.outputs.cache-hit != 'true'
run: brew install-bundler-gems
- name: Run Update mechanism
id: update
shell: bash
env:
HOMEBREW_COLOR: 1
HOMEBREW_DEVELOPER: 1
HOMEBREW_NO_AUTO_UPDATE: 1
HOMEBREW_NO_INSTALL_CLEANUP: 1
GIT_AUTHOR_EMAIL: [email protected]
GIT_AUTHOR_NAME: jcbot
GIT_COMMITTER_EMAIL: [email protected]
GIT_COMMITTER_NAME: jcbot
JCB_GITHUB_API_TOKEN: ${{ secrets.JCB_GITHUB_API_TOKEN }}
JCB_PULLREQUEST_CC: '/cc @leipert'
JCB_SOURCE_FORK_OWNER: leipert
JCB_TARGET_OWNER: Homebrew
JCB_TARGET_REPO: homebrew-cask
run: |
set -o errexit
set -o pipefail
brew update-reset
brew tap homebrew/cask
for formula in git; do
brew install "$formula" || echo "$formula already installed"
done
bash ./jetbrains-cask-bot.sh