-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bdab514
commit e324811
Showing
2 changed files
with
80 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Helm login and installation | ||
|
||
- Helm registry login and optional installation | ||
|
||
#### Use Case | ||
|
||
```yaml | ||
jobs: | ||
chart: | ||
name: Helm chart push | ||
runs-on: ubuntu-latest | ||
steps: | ||
- ... | ||
- name: Helm login | ||
uses: greenbone/actions/helm-login@v3 | ||
- ... | ||
``` | ||
|
||
## Action Configuration | ||
|
||
| Input Variable | Description | | | ||
| ---------------| ----------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | | ||
| registry | Registry name. Default: ghcr.io . | Optional | | ||
| registry-user | Registry login user. Default is github.actor . | Optional | | ||
| registry-token | Registry login password/token. Default is github.token . | Optional | | ||
| helm-version | The Helm version for installation must be specified. If left unset, Helm will not be installed. Note that Helm is preinstalled on all GitHub runners. | Optional | | ||
| helm-token | GitHub token required if the Helm version is set to 'latest'. Default is github.token . | Optional | | ||
|
||
## Action Output | ||
|
||
| Output Variable | Description | | ||
| --------------- | ----------------- | | ||
| helm-path | Helm binary path. | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: Helm login and installation | ||
description: "Helm registry login and optional installation" | ||
|
||
inputs: | ||
registry: | ||
description: "Registry name. Default: ghcr.io ." | ||
default: "ghcr.io" | ||
registry-user: | ||
description: "Registry login user. Default is github.actor ." | ||
default: ${{ github.actor }} | ||
registry-token: | ||
description: "Registry login password/token. Default is github.token ." | ||
default: ${{ github.token }} | ||
helm-version: | ||
description: "The Helm version for installation must be specified. If left unset, Helm will not be installed. Note that Helm is preinstalled on all GitHub runners." | ||
required: false | ||
helm-token: | ||
description: "GitHub token required if the Helm version is set to 'latest'. Default is github.token ." | ||
default: ${{ github.token }} | ||
|
||
outputs: | ||
helm-path: | ||
description: 'Helm binary path.' | ||
value: ${{ steps.helm.outputs.helm-path }} | ||
|
||
branding: | ||
icon: "package" | ||
color: "green" | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Install helm | ||
if: inputs.helm-version | ||
id: helm | ||
uses: azure/setup-helm@v3 | ||
with: | ||
version: ${{ inputs.helm-version }} | ||
token: ${{ inputs.helm-token }} | ||
|
||
- name: Helm registry login | ||
shell: bash | ||
run: | | ||
helm registry login \ | ||
-u '${{ inputs.registry-user }}' \ | ||
-p '${{ inputs.registry-token }}' \ | ||
'${{ inputs.registry }}' |