Skip to content

Commit

Permalink
feat: add flag for dependency update ✨ (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
meysam81 authored Sep 21, 2022
1 parent 9bbdb72 commit e40ad80
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Usage

```yaml
- uses: licenseware/helm@v1
- uses: licenseware/helm@v1.1
with:
# required 👇
kubeconfig: ${{ secrets.KUBECONFIG_FILE }} # JSON/YAML encoded string
Expand All @@ -15,6 +15,7 @@
helm-version: "v3.9.4" # https://github.com/helm/helm/releases
namespace: default
release-name: ${{ github.event.repository.name }}
update-dependencies: "1" # helm dep update
values: image.tag=${{ github.sha }} # comma separated key=value pairs
values-file: ${{ secrets.HELM_VALUES }} # JSON/YAML encoded string
wait: "1"
Expand Down
11 changes: 9 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ author: [email protected]
branding:
color: green
icon: package
description: Deploy Helm chart
description: Deploy Helm chart in a GitHub action
inputs:
action:
default: upgrade -i
Expand Down Expand Up @@ -33,6 +33,10 @@ inputs:
release-name:
default: ${{ github.event.repository.name }}
required: false
update-dependencies:
default: "1"
description: Whether or not to run `helm dependency update` before deployment
required: false
values:
default: ""
description: A comma separated list of values e.g. "key1=value1,key2=value2"
Expand All @@ -53,7 +57,8 @@ runs:
name: Install Helm ${{ inputs.helm-version }}
run: curl -fsSL https://git.io/get_helm.sh | bash
shell: bash
- name: Build Helm dependencies
- if: inputs.update-dependencies == '1'
name: Build Helm dependencies
run: helm dependency update ${{ inputs.chart-dir }}
shell: bash
- if: inputs.values-file != ''
Expand All @@ -62,12 +67,14 @@ runs:
cat << 'EOF' > /tmp/values
${{ inputs.values-file }}
EOF
chmod 600 /tmp/values
shell: bash
- name: Prepare KUBECONFIG
run: |
cat << 'EOF' > /tmp/kubeconfig
${{ inputs.kubeconfig }}
EOF
chmod 600 /tmp/kubeconfig
shell: bash
- name: Deploy with Helm
run: |
Expand Down

0 comments on commit e40ad80

Please sign in to comment.