Skip to content

Commit

Permalink
feat: added cli-version parameter (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
nickytonline authored Sep 16, 2024
1 parent e29d132 commit b349a46
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ jobs:
- name: Pizza Action
uses: open-sauced/[email protected]
with:
# optional and false by default
# optional and default is "@latest". Add this parameter if you want to use a specific version, e.g. v2.0.0
cli-version: "@v2.0.0"
# optional and false by default. Set this to true if you want to have a pull request for the changes created automatically.
commit-and-pr: "true"
# optional
pr-title: "chore: update repository codeowners"
Expand All @@ -40,6 +42,10 @@ The pizza CLI's "generate codeowners ./ --tty-disable" command requires a full r

## Inputs

### `cli-version`

The version of the pizza CLI to use. Default is `@latest`. If using a numbered version, make sure to include the `@` symbol as well as a `v` before the version number. For example, `@v2.0.0`.

### `pizza-args`

Arguments to pass to the pizza CLI. Default is `generate codeowners ./ --tty-disable`.
Expand Down
8 changes: 6 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,14 @@ branding:
icon: "package"
color: "orange"
inputs:
cli-version:
description: "OpenSauced Pizza CLI version to use"
default: "@latest"
required: false
pizza-args:
description: "OpenSauced Pizza CLI command to run"
default: "generate codeowners ./ --tty-disable"
required: true
required: false
commit-and-pr:
description: "Commit and push changes"
default: "false"
Expand All @@ -32,7 +36,7 @@ runs:

- name: Install pizza CLI
run: |
go install github.com/open-sauced/pizza-cli@beta
go install github.com/open-sauced/pizza-cli${{ inputs.cli-version }}
shell: bash

- name: Check pizza CLI version
Expand Down

0 comments on commit b349a46

Please sign in to comment.