Skip to content

Run a ok command

Run a ok command #12

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: ubuntu-latest
defaults:
run:
shell: bash
steps:
- name: Setup Homebrew
uses: Homebrew/actions/setup-homebrew@master
with:
token: "${{ github.token }}"
- name: Install ok
env:
HOMEBREW_GITHUB_API_TOKEN: "${{ github.token }}"
run: |
brew tap oslokommune/ok https://github.com/oslokommune/ok
brew update
brew install ok
ok "${{ inputs.subcommand }}"