Create action.yml
This commit is contained in:
parent
7867fd8eed
commit
f31307fce5
36
helm-publish/action.yml
Normal file
36
helm-publish/action.yml
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
name: "Helm Publishing"
|
||||||
|
description: "Package helm and publish to repository"
|
||||||
|
|
||||||
|
inputs:
|
||||||
|
chart_directory:
|
||||||
|
description: "Charts directory"
|
||||||
|
required: true
|
||||||
|
helm_version:
|
||||||
|
description: "New Helm Chart version"
|
||||||
|
required: true
|
||||||
|
helm_version_placeholder:
|
||||||
|
description: "Version Placeholder value in Chart.yaml"
|
||||||
|
required: false
|
||||||
|
default: "%VERSION%"
|
||||||
|
|
||||||
|
runs:
|
||||||
|
using: "composite"
|
||||||
|
steps:
|
||||||
|
- name: "Install Helm"
|
||||||
|
uses: azure/setup-helm@v3
|
||||||
|
- name: Update Helm version
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
sed -i -e 's/${{ inputs.helm_version_placeholder }}/${{ inputs.helm_version }}/g' ${{ inputs.chart_directory }}/Chart.yaml
|
||||||
|
echo 'Result Helm Chart:'
|
||||||
|
cat ${{ inputs.chart_directory }}/Chart.yaml
|
||||||
|
- name: Package helm
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
helm package ${{ inputs.chart_directory }} --app-version ${{ inputs.helm_version }} --version ${{ inputs.helm_version }} --dependency-update --destination ${{ inputs.chart_directory }}/result.tgz
|
||||||
|
- name: Publishing helm
|
||||||
|
shell: bash
|
||||||
|
env:
|
||||||
|
HELM_FILE: ${{ inputs.chart_directory }}/result.tgz
|
||||||
|
run: |
|
||||||
|
curl --data-binary "@${HELM_FILE}" "${{ vars.HELM_REPOSITORY }}/api/charts?force" -v
|
||||||
Loading…
x
Reference in New Issue
Block a user