forked from Homebrew/homebrew-core
-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (57 loc) · 1.76 KB
/
autobump.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
name: Bump formulae on schedule or request
on:
push:
branches:
- master
paths:
- .github/workflows/autobump.yml
workflow_dispatch:
inputs:
formulae:
description: Custom list of formulae to livecheck and bump if outdated
required: false
schedule:
# Every 3 hours with an offset of 15 minutes
- cron: "15 */3 * * *"
permissions:
contents: read
defaults:
run:
shell: bash -xeuo pipefail {0}
jobs:
autobump:
if: github.repository_owner == 'Homebrew'
runs-on: ubuntu-22.04
container:
image: ghcr.io/homebrew/ubuntu22.04:master
env:
GNUPGHOME: /tmp/gnupghome
steps:
- name: Set up Homebrew
id: set-up-homebrew
uses: Homebrew/actions/setup-homebrew@master
with:
core: true
cask: false
test-bot: false
- name: Configure Git user
uses: Homebrew/actions/git-user-config@master
with:
username: ${{ (github.event_name == 'workflow_dispatch' && github.actor) || 'BrewTestBot' }}
- name: Set up commit signing
uses: Homebrew/actions/setup-commit-signing@master
with:
signing_key: ${{ secrets.BREWTESTBOT_GPG_SIGNING_SUBKEY }}
- name: Bump formulae
env:
HOMEBREW_TEST_BOT_AUTOBUMP: 1
HOMEBREW_GITHUB_API_TOKEN: ${{ secrets.HOMEBREW_CORE_REPO_WORKFLOW_TOKEN }}
HOMEBREW_GPG_PASSPHRASE: ${{ secrets.BREWTESTBOT_GPG_SIGNING_SUBKEY_PASSPHRASE }}
FORMULAE: ${{ inputs.formulae }}
run: |
BREW_BUMP=(brew bump --no-fork --open-pr --formulae)
if [[ -n "${FORMULAE-}" ]]; then
xargs "${BREW_BUMP[@]}" <<<"${FORMULAE}"
else
"${BREW_BUMP[@]}" --auto --tap=Homebrew/core
fi