Skip to content

feat : dependabot workflow automation for updating dependency (#62) #58

feat : dependabot workflow automation for updating dependency (#62)

feat : dependabot workflow automation for updating dependency (#62) #58

Workflow file for this run

name: chart
env:
CHARTMUSEUM_URL: "https://charts.flant.com/api/common/github/charts"
CHART_DIR: "helm/charts/k8s-image-availability-exporter"
on:
push:
tags:
- v*
branches:
- master
pull_request:
branches:
- master
defaults:
run:
shell: "bash -l -eo pipefail {0}"
jobs:
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3.5.2
- uses: werf/actions/install@v1.2
- name: Werf lint chart
run: cd "$CHART_DIR" && werf helm lint
- name: Werf render chart
run: cd "$CHART_DIR" && werf helm template .
publish-charts:
runs-on: ubuntu-latest
if: "github.event_name == 'push' && github.ref == 'refs/heads/master'"
needs: tests
steps:
- uses: actions/checkout@v3.5.2
- uses: werf/actions/install@v1.2
- name: Package werf charts
run: |
mkdir -p .packages
werf helm package "$CHART_DIR" -d .packages
- name: Publish packaged werf charts
run: |
while read package; do
curl -sSL --post301 --data-binary "@.packages/$package" --user "${{ secrets.CHARTMUSEUM_BASIC_AUTH_USER }}:${{ secrets.CHARTMUSEUM_BASIC_AUTH_PASS }}" "$CHARTMUSEUM_URL"
done < <(find .packages -mindepth 1 -maxdepth 1 -type f -name '*.tgz' -exec sh -c 'basename "$0"' '{}' \;)