diff --git a/.github/workflows/deploy-k8s.yml b/.github/workflows/deploy-k8s.yml index aecce3e..9d0a00d 100644 --- a/.github/workflows/deploy-k8s.yml +++ b/.github/workflows/deploy-k8s.yml @@ -79,7 +79,7 @@ jobs: echo "${{ steps.genparams.outputs.k8sparams }}" - name: Create kubernetes secret with service parameters - uses: kodermax/kubectl-aws-eks@214195db51c87cdd4d7c1e33e43f7638b5849186 + uses: kodermax/kubectl-aws-eks@7e223308593f74c42b45782d230783715e131d51 env: KUBE_CONFIG_DATA: ${{ steps.kubeconfig.outputs.KUBECONFIG }} KUBECTL_VERSION: "v1.22.0" @@ -93,7 +93,7 @@ jobs: sed -i 's|${{ inputs.IMAGE_NAME }}|${{ inputs.IMAGE_NAME }}:${{ inputs.KUBE_NAMESPACE }}|' deployment.yaml - name: kubernets apply config - uses: kodermax/kubectl-aws-eks@214195db51c87cdd4d7c1e33e43f7638b5849186 + uses: kodermax/kubectl-aws-eks@7e223308593f74c42b45782d230783715e131d51 env: KUBE_CONFIG_DATA: ${{ steps.kubeconfig.outputs.KUBECONFIG }} KUBECTL_VERSION: "v1.22.0" @@ -102,10 +102,24 @@ jobs: args: apply -f deployment.yaml -n ${{ inputs.KUBE_NAMESPACE }} - name: rollout - uses: kodermax/kubectl-aws-eks@214195db51c87cdd4d7c1e33e43f7638b5849186 + uses: kodermax/kubectl-aws-eks@7e223308593f74c42b45782d230783715e131d51 env: KUBE_CONFIG_DATA: ${{ steps.kubeconfig.outputs.KUBECONFIG }} KUBECTL_VERSION: "v1.22.0" IAM_VERSION: "0.5.6" with: args: rollout restart deploy/${{ inputs.app_name }} -n ${{ inputs.KUBE_NAMESPACE }} + + - name: Template ingress (optional) + shell: bash + run: | + sed -i "s|host: ingress.hostname|host: $(cat .github/workflows/ci-properties.json | jq -r .${{ inputs.ci_env }}_ENV_VARS.INGRESS_HOSTNAME)|" ingress.yaml || true + + - name: apply ingress (optional) + uses: kodermax/kubectl-aws-eks@7e223308593f74c42b45782d230783715e131d51 + env: + KUBE_CONFIG_DATA: ${{ steps.kubeconfig.outputs.KUBECONFIG }} + KUBECTL_VERSION: "v1.22.0" + IAM_VERSION: "0.5.6" + with: + args: apply -f ingress.yaml -n ${{ inputs.KUBE_NAMESPACE }} || true diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index b9c0097..870d4a0 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -48,12 +48,13 @@ jobs: - name: Login to registry ${{ inputs.registry }} if: inputs.event_name != 'pull_request' + uses: docker/login-action@v2 with: registry: ${{ inputs.registry }} - name: Build and push Docker image - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5.0.0 with: context: . file: ${{ inputs.dockerfile_path }}/Dockerfile