From 32502b41021f8fcf1207a87863de5599f1106ae0 Mon Sep 17 00:00:00 2001 From: Nick Date: Tue, 21 May 2024 15:22:32 +1200 Subject: [PATCH] update pipeline --- .github/workflows/build-and-deploy.yaml | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build-and-deploy.yaml b/.github/workflows/build-and-deploy.yaml index 254a1b7..f065230 100644 --- a/.github/workflows/build-and-deploy.yaml +++ b/.github/workflows/build-and-deploy.yaml @@ -1,9 +1,13 @@ +name: Build Docker image and deploy it to Kubernetes cluster + on: push: branches: - master -name: Build Docker image and deploy it to Kubernetes cluster +permissions: + id-token: write + contents: read jobs: deploy: @@ -18,17 +22,17 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Configure AWS credentials - uses: aws-actions/configure-aws-credentials@v2 + uses: aws-actions/configure-aws-credentials@v4 with: - aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} - aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + role-to-assume: ${{ secrets.GA_OIDC_EKS_PROD }} + role-session-name: ChiefKeeper aws-region: ${{ env.AWS_REGION }} - name: Login to Docker Hub - uses: docker/login-action@v1 + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} @@ -41,7 +45,7 @@ jobs: docker push ${{ env.DOCKER_IMAGE_REGISTRY }}:${{ env.DOCKER_IMAGE_TAG }} - name: Deploying app to Kubernetes with Helm - uses: bitovi/github-actions-deploy-eks-helm@v1.2.4 + uses: bitovi/github-actions-deploy-eks-helm@v1.2.9 with: values: image.repository=${{ env.DOCKER_IMAGE_REGISTRY }},image.tag=${{ env.DOCKER_IMAGE_TAG }} cluster-name: ${{ env.CLUSTER_NAME }}