Skip to content

Commit

Permalink
Merge pull request #14 from hashicorp/add-vendor-input
Browse files Browse the repository at this point in the history
set default values for maintainer and vendor to hashicorp
  • Loading branch information
claire-labry committed Feb 2, 2023
2 parents 4b08f0c + 3a0c55f commit 0596d94
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ This is a GitHub Action wrapper around nFPM, used to produce DEBs and RPMs.
| `arch` | Build architecture. | |
| `version` | Product semver version. | |
| `maintainer` | Maintainer name. | |
| `vendor` | Default vendor. | HashiCorp |
| `description` | Product description. | |
| `homepage` | Product homepage. | |
| `license` | Product usage license. | |
Expand Down
4 changes: 4 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ inputs:
description: 'Maintainer name.'
default: ''
required: false
vendor:
description: 'Vendor name'
default: 'HashiCorp'
required: false
description:
description: 'Product description.'
default: ''
Expand Down
6 changes: 5 additions & 1 deletion fpm_template.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ type NfpmInput struct {
Arch string
Version string
Maintainer string
Vendor string
Description string
Homepage string
License string
Expand Down Expand Up @@ -76,6 +77,7 @@ func main() {
inputArch := os.Getenv("INPUT_ARCH")
inputVersion := os.Getenv("INPUT_VERSION")
inputMaintainer := os.Getenv("INPUT_MAINTAINER")
inputVendor := os.Getenv("INPUT_VENDOR")
inputDescription := os.Getenv("INPUT_DESCRIPTION")
inputHomepage := os.Getenv("INPUT_HOMEPAGE")
inputLicense := os.Getenv("INPUT_LICENSE")
Expand Down Expand Up @@ -110,6 +112,7 @@ func main() {
Arch: inputArch,
Version: inputVersion,
Maintainer: inputMaintainer,
Vendor: inputVendor,
Description: inputDescription,
Homepage: inputHomepage,
License: inputLicense,
Expand All @@ -136,7 +139,8 @@ arch: {{ .Arch }}
platform: linux
release: 1
version: {{ .Version }}
maintainer: {{ .Maintainer }}
maintainer: {{ .Maintainer}}
vendor: {{ .Vendor }}
description: {{ .Description }}
homepage: {{ .Homepage }}
license: {{ .License }}
Expand Down

0 comments on commit 0596d94

Please sign in to comment.