diff --git a/.github/workflows/dc-rest-poller.yml b/.github/workflows/dc-rest-poller.yml index 1bddcb3..6101730 100644 --- a/.github/workflows/dc-rest-poller.yml +++ b/.github/workflows/dc-rest-poller.yml @@ -72,4 +72,36 @@ jobs: aws-access-key-id: ${{ secrets.AWS_DEV_ACCESS_KEY_ID }} aws-secret-access-key: ${{ secrets.AWS_DEV_ACCESS_KEY_SECRET }} aws-eks-cluster-name: aws-main-eu-01 + aws-region: eu-west-1 + + deploy-route220-prod: + if: github.ref == 'refs/heads/prod' + needs: build + runs-on: ubuntu-22.04 + concurrency: dc-rest-poller-route220-prod + environment: prod + env: + VALUES_YAML: infrastructure/helm/echarging-route220.yaml + K8S_NAME: dc-rest-poller-echarging-route220 + steps: + - name: Checkout source code + uses: actions/checkout@v4 + + - name: Customize values.yaml + working-directory: ${{ env.WORKING_DIRECTORY }} + run: | + yq -i '.image.repository="${{ env.DOCKER_IMAGE }}"' ${{ env.VALUES_YAML}} + yq -i '.image.tag="${{ env.DOCKER_TAG }}"' ${{ env.VALUES_YAML }} + yq -i '.image.pullPolicy="IfNotPresent"' ${{ env.VALUES_YAML }} + + - name: Deploy on cluster + uses: noi-techpark/github-actions/helm-deploy@v2 + with: + k8s-name: ${{ env.K8S_NAME }} + k8s-namespace: collector + chart-path: helm/generic-collector + values-file: ${{ env.WORKING_DIRECTORY}}/${{ env.VALUES_YAML }} + aws-access-key-id: ${{ secrets.AWS_PROD_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_PROD_ACCESS_KEY_SECRET }} + aws-eks-cluster-name: aws-main-eu-01 aws-region: eu-west-1 \ No newline at end of file