Skip to content

Run a ok command

Run a ok command #19

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: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Set up Go
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
with:
go-version-file: "go.mod"
cache-dependency-path: "go.sum"
- name: Setup mocks
run: |
./.github/scripts/setup_mocks.sh
- name: Run ok
run: |
setupMocks
go run main.go "${{ inputs.subcommand }}"