-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (59 loc) · 2.14 KB
/
Copy pathci.yml
File metadata and controls
69 lines (59 loc) · 2.14 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
64
65
66
67
68
69
name: CI
on:
push:
branches: [main]
pull_request:
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
# `brew test-bot --only-tap-syntax` is the canonical tap check: it runs
# `brew style` (rubocop-cask) and an offline `brew audit` over every cask.
tap-syntax:
runs-on: macos-26
permissions:
actions: read
checks: read
contents: read
pull-requests: read
steps:
- name: Set up Homebrew
id: set-up-homebrew
uses: Homebrew/actions/setup-homebrew@c8707045ccae42888fe98e86f2ee8938bc7cc193 # 2026.08.10.1
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Cache Homebrew Bundler RubyGems
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: ${{ steps.set-up-homebrew.outputs.gems-path }}
key: macos-26-rubygems-${{ steps.set-up-homebrew.outputs.gems-hash }}
restore-keys: macos-26-rubygems-
- run: brew test-bot --only-cleanup-before
- run: brew test-bot --only-setup
- run: brew test-bot --only-tap-syntax
# Verifies that every cask's download URL resolves and that its sha256 still
# matches the bytes upstream is serving.
audit-online:
runs-on: macos-26
permissions:
contents: read
steps:
- name: Set up Homebrew
uses: Homebrew/actions/setup-homebrew@c8707045ccae42888fe98e86f2ee8938bc7cc193 # 2026.08.10.1
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Audit casks
env:
HOMEBREW_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
set -euo pipefail
# "maptic/homebrew-tap" is addressed as "maptic/tap" by Homebrew.
tap="${GITHUB_REPOSITORY/\/homebrew-//}"
cd "$(brew --repository "${tap}")"
[[ -d Casks ]] || { echo "No casks to audit."; exit 0; }
casks=$(find Casks -name '*.rb' -exec basename {} .rb \; | sed "s|^|${tap}/|")
[[ -n "${casks}" ]] || { echo "No casks to audit."; exit 0; }
# shellcheck disable=SC2086
brew audit --cask --online --strict $casks