Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support version: for specifying version of gostyle #4

Merged
merged 1 commit into from
Sep 16, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 15 additions & 8 deletions action.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
name: 'gostyle-action'
description: 'Run gostyle'
inputs:
# inputs for actions/checkout
repo-checkout:
description: "Checkout the repository"
required: false
default: false
# inputs for actions/setup-go
setup-go:
description: "Set up Go"
required: false
Expand All @@ -20,17 +26,14 @@ inputs:
description: 'Go Package to scan with gostyle'
required: false
default: './...'
go-version-file:
description: 'Path to the go.mod or go.work file.'
required: false
# inputs for gostyle
work-dir:
description: 'Directory in which to run gostyle'
required: false
default: ''
repo-checkout:
description: "Checkout the repository"
required: false
default: false
go-version-file:
description: 'Path to the go.mod or go.work file.'
required: false
config-file:
description: 'Config file path for gostyle.'
required: false
Expand All @@ -39,6 +42,10 @@ inputs:
description: 'Flags for gostyle'
required: false
default: ''
version:
description: 'Version of gostyle'
required: false
default: 'latest'
runs:
using: "composite"
steps:
Expand All @@ -52,7 +59,7 @@ runs:
go-version-file: ${{ inputs.go-version-file }}
cache: ${{ inputs.cache }}
- name: Install gostyle
run: go install github.com/k1LoW/gostyle@latest
run: go install github.com/k1LoW/gostyle@${{ inputs.version }}
shell: bash
- name: Set package
id: package
Expand Down