feat: add release-helm-chart (#10)
All checks were successful
CD / Release (push) Successful in 11s
All checks were successful
CD / Release (push) Successful in 11s
Reviewed-on: #10 Co-authored-by: Timo Behrendt <t.behrendt@t00n.de> Co-committed-by: Timo Behrendt <t.behrendt@t00n.de>
This commit was merged in pull request #10.
This commit is contained in:
@@ -5,3 +5,4 @@ Collection of Gitea friendly actions.
|
||||
## Actions
|
||||
|
||||
- [release-git-tag](./release-git-tag//README.md)
|
||||
- [release-helm-chart](./release-helm-chart/README.md)
|
||||
|
||||
23
release-helm-chart/README.md
Normal file
23
release-helm-chart/README.md
Normal file
@@ -0,0 +1,23 @@
|
||||
# release-helm-chart
|
||||
|
||||
Packages and releases a Helm chart to a Gitea Helm registry.
|
||||
|
||||
## Inputs
|
||||
|
||||
| Input | Description | Required |
|
||||
| ------------------- | ----------------------------- | -------- |
|
||||
| `tag` | The version tag to release | Yes |
|
||||
| `name` | The name of the Helm chart | Yes |
|
||||
| `registry-user` | The username for the registry | Yes |
|
||||
| `registry-password` | The password for the registry | Yes |
|
||||
|
||||
## Example
|
||||
|
||||
```yaml
|
||||
- uses: ./release-helm-chart
|
||||
with:
|
||||
tag: v1.2.3
|
||||
name: my-chart
|
||||
registry-user: myuser
|
||||
registry-password: ${{ secrets.REGISTRY_PASSWORD }}
|
||||
```
|
||||
30
release-helm-chart/action.yaml
Normal file
30
release-helm-chart/action.yaml
Normal file
@@ -0,0 +1,30 @@
|
||||
name: Release Helm chart
|
||||
description: Release the Helm chart
|
||||
|
||||
inputs:
|
||||
tag:
|
||||
description: The tag to release
|
||||
required: true
|
||||
name:
|
||||
description: The name of the Helm chart
|
||||
required: true
|
||||
registry-user:
|
||||
description: The username for the registry
|
||||
required: true
|
||||
registry-password:
|
||||
description: The password for the registry
|
||||
required: true
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- shell: bash
|
||||
run: |
|
||||
helm package ${{ inputs.name }} --version ${{ inputs.tag }}
|
||||
- shell: bash
|
||||
run: |
|
||||
curl --verbose --fail --show-error \
|
||||
--user ${{ inputs.registry-user }}:${{ inputs.registry-password }} \
|
||||
-X POST \
|
||||
--upload-file ./${{ inputs.name }}-${{ inputs.tag }}.tgz \
|
||||
https://gitea.t000-n.de/api/packages/${{ inputs.registry-user }}/helm/api/charts
|
||||
Reference in New Issue
Block a user