From 450497f47c63d6582ed2ffe9f903a72b8fc4207d Mon Sep 17 00:00:00 2001 From: Mahsa Date: Mon, 29 Jan 2024 10:39:35 +0330 Subject: [PATCH] Test: Helm Chart release workflow --- .github/workflows/ci.yaml | 36 +++++++++++++++++++++++++++++++----- 1 file changed, 31 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 0e579e6..64a6598 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -1,12 +1,9 @@ --- -name: Lint, Test and Image Build CI +name: Lint, Test, Image Build and Chart release on: push: - branches: [ main ] - tags: [ '**' ] - pull_request: - branches: [ main ] + branches: [ Workflows ] jobs: lint: @@ -56,3 +53,32 @@ jobs: platforms: linux/amd64 push: true tags: ghcr.io/${{ github.repository }}${{ matrix.dir }}:${{ github.sha }} + + release: + name: release + runs-on: ubuntu-latest + needs: + - build + strategy: + matrix: + dir: ["deployments/server", "clients/proxy-client/deploy", "clients/harbor-client/deploy"] + steps: + - name: Checkout + uses: actions/checkout@v3 + 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@v3 + + - name: Run chart-releaser + uses: helm/chart-releaser-action@v1.6.0 + with: + charts_dir: ${{ matrix.dir }} + env: + CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"