-
Notifications
You must be signed in to change notification settings - Fork 91
135 lines (108 loc) · 3.83 KB
/
ci.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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
name: CI
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ master ]
pull_request:
branches: [ master ]
permissions:
contents: read
jobs:
upgrade:
strategy:
matrix:
os:
- macos-12
- macos-13
- macos-14
runs-on: ${{ matrix.os }}
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/[email protected]
- name: Brew Update
run: |
brew update
brew --version
- name: Setup Homebrew Tap
run: |
mkdir -p /usr/local/Homebrew/Library/Taps/buo/homebrew-cask-upgrade
cp -rf . /usr/local/Homebrew/Library/Taps/buo/homebrew-cask-upgrade
- name: Run Brew Cask Upgrade
run: brew cu -y -a --no-brew-update
- name: Check no reported updates
run: brew cu -y -a --no-brew-update --report-only
pinning-workflow:
strategy:
matrix:
os:
- macos-14
runs-on: ${{ matrix.os }}
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/[email protected]
- name: Brew Update
run: |
brew update
brew --version
- name: Setup Homebrew Tap
run: |
mkdir -p /usr/local/Homebrew/Library/Taps/buo/homebrew-cask-upgrade
cp -rf . /usr/local/Homebrew/Library/Taps/buo/homebrew-cask-upgrade
- name: Verify cask is reporting outdated
run: brew cu --all --no-brew-update google-chrome --report-only || test $? -eq 1
- name: Pin google-chrome
run: brew cu pin google-chrome
- name: Verify it is not reporting outdated
run: brew cu --all --no-brew-update google-chrome --report-only
- name: Unpin google-chrome
run: brew cu unpin google-chrome
- name: Verify it is reporting outdated
run: brew cu --all --no-brew-update google-chrome --report-only || test $? -eq 1
pinned-export-workflow:
strategy:
matrix:
os:
- macos-14
runs-on: ${{ matrix.os }}
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/[email protected]
- name: Brew Update
run: |
brew update
brew --version
- name: Setup Homebrew Tap
run: |
mkdir -p /usr/local/Homebrew/Library/Taps/buo/homebrew-cask-upgrade
cp -rf . /usr/local/Homebrew/Library/Taps/buo/homebrew-cask-upgrade
- name: Pin google-chrome
run: brew cu pin google-chrome
- name: Export pinned casks
run: brew cu pinned --export exported.txt
- name: Setup expected file
run: echo "google-chrome" > expected.txt
- name: Verify exported file is as expected
run: cmp exported.txt expected.txt
pinned-load-workflow:
strategy:
matrix:
os:
- macos-14
runs-on: ${{ matrix.os }}
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/[email protected]
- name: Brew Update
run: |
brew update
brew --version
- name: Setup Homebrew Tap
run: |
mkdir -p /usr/local/Homebrew/Library/Taps/buo/homebrew-cask-upgrade
cp -rf . /usr/local/Homebrew/Library/Taps/buo/homebrew-cask-upgrade
- name: Setup backup file
run: echo "google-chrome" > /usr/local/Homebrew/Library/Taps/buo/homebrew-cask-upgrade/backup.txt
- name: Import backup file
run: brew cu pinned --load /usr/local/Homebrew/Library/Taps/buo/homebrew-cask-upgrade/backup.txt
- name: Verify exported file is as expected
run: cd /usr/local/Homebrew/Library/Taps/buo/homebrew-cask-upgrade && cmp pinned backup.txt