diff --git a/.github/workflows/build.yml b/.github/workflows/build_and_push.yml similarity index 100% rename from .github/workflows/build.yml rename to .github/workflows/build_and_push.yml diff --git a/.github/workflows/release-charts.yml b/.github/workflows/release-charts.yml deleted file mode 100644 index 95c9ba40..00000000 --- a/.github/workflows/release-charts.yml +++ /dev/null @@ -1,34 +0,0 @@ -name: Release Charts - -on: - push: - paths: - - 'deploy/helm/**' - branches: - - develop - -jobs: - release: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Configure Git - run: | - git config user.name "$GITHUB_ACTOR" - git config user.email "$GITHUB_ACTOR@users.noreply.github.com" - - - name: Install Helm - uses: azure/setup-helm@v4 - with: - version: v3.14.3 - - - name: Run chart-releaser - uses: helm/chart-releaser-action@v1.6.0 - env: - CR_TOKEN: "${{ secrets.CR_TOKEN }}" - with: - charts_dir: deploy/helm diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index af9a5c0c..74acf58b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -221,3 +221,31 @@ jobs: DBUILD_REPO_URL=https://github.com/openebs/dynamic-localpv-provisioner DBUILD_SITE_URL=https://openebs.io RELEASE_TAG=${{ env.RELEASE_TAG }} + + + release-chart: + runs-on: ubuntu-latest + needs: ["provisioner-localpv"] + steps: + - uses: actions/checkout@v4 + + - uses: cachix/install-nix-action@v22 + - name: Pre-populate nix-shell + run: | + export NIX_PATH=nixpkgs=$(jq '.nixpkgs.url' nix/sources.json -r) + echo "NIX_PATH=$NIX_PATH" >> $GITHUB_ENV + nix-shell --pure --run "echo" ./shell.nix + + - name: Check if the chart is publishable + run: | + TAG=${{ github.event.release.tag_name }} + nix-shell --pure --run "./scripts/update-chart-version.sh --tag $TAG --publish-release" ./shell.nix + + - name: Publish zfs localpv develop or prerelease helm chart + uses: stefanprodan/helm-gh-pages@master + with: + token: ${{ secrets.GITHUB_TOKEN }} + charts_dir: ./deploy/helm + + +