Skip to content

Commit

Permalink
Build and publish chart on any version bump
Browse files Browse the repository at this point in the history
  • Loading branch information
sd109 committed Sep 4, 2024
1 parent 896b63e commit e30c473
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion .github/workflows/helm-build-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,34 @@ name: Publish Danswer Helm Chart
on:
push:
branches:
- main
- "*"
workflow_dispatch:

jobs:
check_for_helm_chart_version_change:
runs-on: ubuntu-latest
outputs:
version_changed: ${{ steps.version_check.outputs.chart_version_changed }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Check for Helm chart version bump
id: version_check
run: |
changed=$(git diff HEAD~1 deployment/helm/Chart.yaml | grep --silent "^+version: " && echo true)
echo chart_version_changed=$changed >> $GITHUB_OUTPUTS
release:
# depending on default permission settings for your org (contents being read-only or read-write for workloads), you will have to add permissions
# see: https://docs.github.com/en/actions/security-guides/automatic-token-authentication#modifying-the-permissions-for-the-github_token
permissions:
contents: write
runs-on: ubuntu-latest
needs: check_for_helm_chart_version_change
if: ${{ needs.check_for_helm_chart_version_change.outputs.version_changed == 'true' }}
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down

0 comments on commit e30c473

Please sign in to comment.