This repository has been archived by the owner on Jul 25, 2024. It is now read-only.
forked from Homebrew/homebrew-cask
-
Notifications
You must be signed in to change notification settings - Fork 0
85 lines (72 loc) · 2.39 KB
/
bump-unversioned-casks.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
name: Bump unversioned casks
on:
push:
paths:
- .github/workflows/bump-unversioned-casks.yml
schedule:
- cron: "*/30 * * * *"
workflow_dispatch:
inputs:
clear_cache:
description: Clear cache
required: false
default: false
concurrency:
group: bump-unversioned-casks
cancel-in-progress: true
env:
HOMEBREW_DEVELOPER: 1
HOMEBREW_NO_AUTO_UPDATE: 1
permissions:
contents: read
jobs:
bump-unversioned-casks:
if: startsWith(github.repository, 'Homebrew/')
runs-on: macos-11.0
steps:
- name: Set up Homebrew
id: set-up-homebrew
uses: Homebrew/actions/setup-homebrew@master
with:
core: false
cask: true
test-bot: false
- name: Configure Git user
uses: Homebrew/actions/git-user-config@master
with:
username: BrewTestBot
- name: Set up commit signing
id: set-up-commit-signing
uses: Homebrew/actions/setup-commit-signing@master
with:
signing_key: ${{ secrets.BREWTESTBOT_GPG_SIGNING_SUBKEY }}
- name: Cache Homebrew Gems
uses: actions/cache@v4
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 Gems
run: brew install-bundler-gems
- name: Generate cache ID
id: cache-id
run: |
echo "time=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_OUTPUT
- name: Cache state
uses: actions/cache@v4
with:
path: ~/bump-unversioned-casks-state.json
key: bump-unversioned-casks-${{ steps.cache-id.outputs.time }}
restore-keys: bump-unversioned-casks-
- name: Clear cache
if: github.event.inputs.clear_cache == 'true'
run: |
rm -f ~/bump-unversioned-casks-state.json
- name: Run brew bump-unversioned-casks ${{ github.repository }}
run: |
brew bump-unversioned-casks --state-file ~/bump-unversioned-casks-state.json --limit 15 '${{ github.repository }}'
env:
HOMEBREW_DEBUG: 1
HOMEBREW_GITHUB_API_TOKEN: ${{ secrets.HOMEBREW_GITHUB_PUBLIC_REPO_TOKEN }}
HOMEBREW_GPG_PASSPHRASE: ${{ secrets.BREWTESTBOT_GPG_SIGNING_SUBKEY_PASSPHRASE }}
timeout-minutes: 20