From 3ccbf30d3a4d5e4944eec696e6296d43f37b3c4d Mon Sep 17 00:00:00 2001 From: ypoplavs <45286051+ypoplavs@users.noreply.github.com> Date: Wed, 29 Mar 2023 13:26:40 +0300 Subject: [PATCH] merged two workflows in one file (#128) --- .github/workflows/docker-build.yaml | 30 +++++++++++++- .../testkube_operator_helm-releaser.yaml | 41 ------------------- 2 files changed, 29 insertions(+), 42 deletions(-) delete mode 100644 .github/workflows/testkube_operator_helm-releaser.yaml diff --git a/.github/workflows/docker-build.yaml b/.github/workflows/docker-build.yaml index d9b19808..01fd1730 100644 --- a/.github/workflows/docker-build.yaml +++ b/.github/workflows/docker-build.yaml @@ -30,4 +30,32 @@ jobs: version: latest args: release -f .goreleaser.yml env: - GITHUB_TOKEN: ${{ secrets.CI_BOT_TOKEN }} \ No newline at end of file + GITHUB_TOKEN: ${{ secrets.CI_BOT_TOKEN }} + + - name: getting Tag name + id: vars + run: echo ::set-output name=tag::${GITHUB_REF#refs/*/} + + - name: Editing helm-release repo with version based on a Tag pushed. + run: | + + # Setting up Git: + + git clone https://kubeshop-bot:$GH_PUSH_TOKEN@github.com/kubeshop/helm-charts + cd ./helm-charts + git config user.name "kubeshop-bot" + git config user.email "kubeshop-bot@kubeshop.io" + + # Calling chart releaser script by passing needed folder name: + # E.G. in order to relase api-server": + # -->> ./chart_releaser.sh --helm-chart-folder api-server + + export GH_PUSH_TOKEN + export RELEASE_VERSION + + cd ./scripts + ./chart_releaser.sh --helm-chart-folder testkube-operator --main-chart false + + env: + GH_PUSH_TOKEN: ${{ secrets.CI_BOT_TOKEN }} + RELEASE_VERSION: ${{ steps.vars.outputs.tag }} diff --git a/.github/workflows/testkube_operator_helm-releaser.yaml b/.github/workflows/testkube_operator_helm-releaser.yaml deleted file mode 100644 index 73ed70de..00000000 --- a/.github/workflows/testkube_operator_helm-releaser.yaml +++ /dev/null @@ -1,41 +0,0 @@ -name: testkube-operator-helm-releaser - -on: - push: - tags: - - "v[0-9]+.[0-9]+.[0-9]+" - # - "v[0-9]+.[0-9]+.[0-9]+-*" - # - "vTesting[0-9]+.[0-9]+.[0-9]+" - # - "vTesting[0-9]+.[0-9]+.[0-9]+-*" - -jobs: - releasing_helm_chart_testkube-operator: - runs-on: ubuntu-latest - steps: - - name: getting Tag name pushed. - id: vars - run: echo ::set-output name=tag::${GITHUB_REF#refs/*/} - - - name: Editing helm-release repo with version based on a Tag pushed. - run: | - - # Setting up Git: - - git clone https://kubeshop-bot:$GH_PUSH_TOKEN@github.com/kubeshop/helm-charts - cd ./helm-charts - git config user.name "kubeshop-bot" - git config user.email "kubeshop-bot@kubeshop.io" - - # Calling chart releaser script by passing needed folder name: - # E.G. in order to relase api-server": - # -->> ./chart_releaser.sh --helm-chart-folder api-server - - export GH_PUSH_TOKEN - export RELEASE_VERSION - - cd ./scripts - ./chart_releaser.sh --helm-chart-folder testkube-operator --main-chart false - - env: - GH_PUSH_TOKEN: ${{ secrets.CI_BOT_TOKEN }} - RELEASE_VERSION: ${{ steps.vars.outputs.tag }}