diff --git a/.github/workflows/helm.yaml b/.github/workflows/helm.yaml new file mode 100644 index 00000000..248743f4 --- /dev/null +++ b/.github/workflows/helm.yaml @@ -0,0 +1,61 @@ +name: Helm + +on: + push: + branches: + - main + - develop + +jobs: + + changes: + runs-on: ubuntu-latest + if: | + (github.repository == 'bfenetworks/ingress-bfe') + outputs: + docs: ${{ steps.filter.outputs.docs }} + charts: ${{ steps.filter.outputs.charts }} + + steps: + + - name: Checkout + uses: actions/checkout@v2 + + - uses: dorny/paths-filter@v2 + id: filter + with: + token: ${{ secrets.GITHUB_TOKEN }} + filters: | + charts: + - 'charts/bfe-ingress-controller/Chart.yaml' + - 'charts/bfe-ingress-controller/**/*' + + chart: + name: Release Chart + runs-on: ubuntu-latest + needs: + - changes + if: | + (github.repository == 'bfenetworks/ingress-bfe') && + (needs.changes.outputs.charts == 'true') + + steps: + + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Configure Git + shell: bash + run: | + git config --global user.name "$GITHUB_ACTOR" + git config --global user.email "$GITHUB_ACTOR@users.noreply.github.com" + + - name: Run chart-releaser + uses: helm/chart-releaser-action@v1.1.0 + env: + CR_TOKEN: "${{ secrets.PERSONAL_TOKEN }}" + CR_RELEASE_NAME_TEMPLATE: "helm-chart-{{ .Version }}" + with: + charts_dir: charts