-
Notifications
You must be signed in to change notification settings - Fork 6
56 lines (49 loc) Β· 1.67 KB
/
ruby.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
name: Ruby
on:
schedule:
- cron: 0 0 * * *
workflow_dispatch:
pull_request:
paths:
- .github/workflows/ruby.y*ml
jobs:
build:
if: github.repository_owner == 'Homebrew' || !github.event.schedule
runs-on: ubuntu-latest
steps:
- name: Set up Homebrew
id: set-up-homebrew
uses: Homebrew/actions/setup-homebrew@master
with:
core: false
cask: false
test-bot: true
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- name: Cache Bundler RubyGems
id: cache
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
with:
path: ${{ steps.set-up-homebrew.outputs.gems-path }}
key: ${{ runner.os }}-rubygems-syntax-${{ steps.set-up-homebrew.outputs.gems-hash }}
restore-keys: ${{ runner.os }}-rubygems-syntax-
- name: Install Homebrew Bundler RubyGems
if: steps.cache.outputs.cache-hit != 'true'
run: brew install-bundler-gems
- name: Configure git
run: |
git config user.email 'ta2gch@gmail.com'
git config user.name 'TANIGUCHI Masaya'
- name: Generate formulae
if: github.event_name == 'pull_request'
run: brew generate-linux-fonts --verbose --debug --write-only
- name: Generate and commit formulae
if: github.event_name != 'pull_request'
run: brew generate-linux-fonts --verbose --debug
- name: Publish to GitHub
if: github.event_name != 'pull_request'
env:
TOKEN: ${{ secrets.PUSH_TOKEN }}
run: |
git push "https://fgborges:${TOKEN}@github.com/Homebrew/homebrew-linux-fonts" HEAD:master