Skip to content
This repository has been archived by the owner on May 16, 2024. It is now read-only.

Commit

Permalink
.github/workflows: add autobump
Browse files Browse the repository at this point in the history
Add an `autobump` workflow for our most bumped casks.
  • Loading branch information
bevanjkay authored Apr 14, 2024
1 parent f742713 commit 7380330
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/autobump.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Bump casks on schedule or request

on:
workflow_dispatch:
inputs:
casks:
description: Custom list of casks to livecheck and bump if outdated
required: false
schedule:
# Every 6 hours 23 minutes past the hour
- cron: "23 */6 * * *"

permissions:
contents: read

jobs:
autobump:
if: github.repository == 'Homebrew/homebrew-cask-fonts'
runs-on: macos-latest
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: ${{ (github.event_name == 'workflow_dispatch' && github.actor) || 'BrewTestBot' }}

- name: Get list of autobump casks
id: autobump
run: echo "autobump_list=$(xargs < "$(brew --repo homebrew/cask-fonts)"/.github/autobump.txt)" >> "$GITHUB_OUTPUT"

- name: Bump casks
uses: Homebrew/actions/bump-packages@master
continue-on-error: true
with:
token: ${{ secrets.HOMEBREW_CASK_REPO_WORKFLOW_TOKEN }}
casks: ${{ github.event.inputs.casks || steps.autobump.outputs.autobump_list }}
env:
HOMEBREW_TEST_BOT_AUTOBUMP: 1

0 comments on commit 7380330

Please sign in to comment.