-
Notifications
You must be signed in to change notification settings - Fork 1
80 lines (57 loc) · 1.62 KB
/
run_ok_command.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
name: Run a ok command
on:
workflow_dispatch:
inputs:
subcommand:
type: choice
description: 'The ok command to run'
options:
- 'env'
- 'bootstrap'
- 'scaffold'
working_directory:
description: >
The working directory to run ok from.
required: true
type: string
create_pr:
type: boolean
description: 'Create a PR with the changes'
default: false
workflow_call:
secrets:
GPG_PRIVATE_KEY:
description: "The GPG private key to use for signing commits"
required: true
GPG_PASSPHRASE:
description: "The passphrase for the GPG private key"
required: true
inputs:
subcommand:
type: string
description: 'The ok command to run'
required: true
create_pr:
type: boolean
description: 'Create a PR with the changes'
default: false
jobs:
mage:
name: "Run ok subcommand ${{ inputs.subcommand }}"
runs-on: macos-latest
defaults:
run:
shell: bash
steps:
- if: runner.os == 'linux'
name: Add Homebrew to PATH
run: echo "/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin" >> $GITHUB_PATH
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Install ok
env:
HOMEBREW_GITHUB_API_TOKEN: "${{ github.token }}"
run: |
brew tap oslokommune/ok https://github.com/oslokommune/ok
brew install ok
ok "${{ inputs.subcommand }}"