Skip to content

Commit

Permalink
Merge pull request #4 from k1LoW/version
Browse files Browse the repository at this point in the history
Support `version:` for specifying version of gostyle
  • Loading branch information
k1LoW authored Sep 16, 2023
2 parents 61125c5 + c42bfed commit 6e44a68
Showing 1 changed file with 15 additions and 8 deletions.
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

0 comments on commit 6e44a68

Please sign in to comment.