From a2af144519b71f0a02084a7200d916ea8bf9bf89 Mon Sep 17 00:00:00 2001 From: Mojtaba Arezoomand Date: Wed, 4 Sep 2024 23:23:57 +0330 Subject: [PATCH] ci: added build ci --- .github/workflows/build.yaml | 33 +++++++++++++++++++++++++++++++++ .github/workflows/test.yaml | 4 ++-- 2 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/build.yaml diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 0000000..ab57e5b --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,33 @@ +name: Release + +on: + push: + tags: + - '*' + +jobs: + release: + name: Release + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup Helm + uses: azure/setup-helm@v4.2.0 + id: install + with: + version: v3.15.4 + + - name: Login to Docker registry + run: helm registry login registry.hub.docker.com -u mojixcoder -p ${{ secrets.DOCKER_REGISTRY_TOKEN }} + + - name: Set release version + run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV + + - name: Building charts + run: helm package . --version="${{ env.RELEASE_VERSION }}" --dependency-update + + - name: Push to registry + run: helm push redis-cluster-${{ env.RELEASE_VERSION }}.tgz oci://registry.hub.docker.com/mojixcoder diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 7b56694..d6bdf03 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -15,13 +15,13 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup Helm uses: azure/setup-helm@v4.2.0 id: install with: - version: v3.14.4 + version: v3.15.4 - name: Setup kubeconform-helm run: helm plugin install https://github.com/jtyr/kubeconform-helm