Skip to content

Commit

Permalink
ci: Add ok command runner workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
staticaland committed Nov 20, 2023
1 parent 96af6ed commit 6e3e48d
Showing 1 changed file with 70 additions and 0 deletions.
70 changes: 70 additions & 0 deletions .github/workflows/run_ok_command.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
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: Install ok
run: |
export HOMEBREW_GITHUB_API_TOKEN=$(gh config get -h github.com oauth_token)
brew tap oslokommune/ok [email protected]:oslokommune/ok.git
brew install ok
ok "${{ inputs.subcommand }}"

0 comments on commit 6e3e48d

Please sign in to comment.