From 42cf73a390e5c32ed394be9c87d8ee03b574392d Mon Sep 17 00:00:00 2001 From: Michael Della Bitta Date: Fri, 20 Dec 2024 14:26:19 -0500 Subject: [PATCH 1/6] fixes to deployment workflows --- .github/workflows/deploy-staging.yml | 22 +++++++++++++++++----- .github/workflows/deploy.yml | 19 +++++++++++++++---- 2 files changed, 32 insertions(+), 9 deletions(-) diff --git a/.github/workflows/deploy-staging.yml b/.github/workflows/deploy-staging.yml index b8c258d..f53ebf6 100644 --- a/.github/workflows/deploy-staging.yml +++ b/.github/workflows/deploy-staging.yml @@ -10,10 +10,10 @@ 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 }} @@ -21,12 +21,14 @@ jobs: - name: Login to Amazon ECR id: login-ecr - uses: aws-actions/amazon-ecr-login@v1 + uses: aws-actions/amazon-ecr-login@v2 - name: Set up JDK 1.8 - uses: actions/setup-java@v1 + uses: actions/setup-java@v4 with: - java-version: 1.8 + distribution: temurin + java-version: 8 + cache: sbt - name: Set up QEMU uses: docker/setup-qemu-action@v2 @@ -53,6 +55,16 @@ jobs: - name: Debug run: echo ${{ env.BRANCH_NAME }} + - name: Create Sentry release + uses: getsentry/action-release@v1 + env: + SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} + SENTRY_ORG: ${{ secrets.SENTRY_ORG }} + SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }} + with: + environment: staging + + - name: Build, tag, and push image to Amazon ECR id: build-image env: diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 61d5834..3ec6d26 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -11,7 +11,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Configure AWS credentials uses: aws-actions/configure-aws-credentials@v2 @@ -22,12 +22,14 @@ jobs: - name: Login to Amazon ECR id: login-ecr - uses: aws-actions/amazon-ecr-login@v1 + uses: aws-actions/amazon-ecr-login@v2 - name: Set up JDK 1.8 - uses: actions/setup-java@v1 + uses: actions/setup-java@v4 with: - java-version: 1.8 + java-version: 8 + distribution: temurin + cache: sbt - name: Set up QEMU uses: docker/setup-qemu-action@v2 @@ -54,6 +56,15 @@ jobs: - name: Debug run: echo ${{ env.BRANCH_NAME }} + - name: Create Sentry release + uses: getsentry/action-release@v1 + env: + SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} + SENTRY_ORG: ${{ secrets.SENTRY_ORG }} + SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }} + with: + environment: production + - name: Build, tag, and push image to Amazon ECR id: build-image env: From 474160812fb2eea01c625115459d5e120a0f961f Mon Sep 17 00:00:00 2001 From: Michael Della Bitta Date: Fri, 20 Dec 2024 14:31:29 -0500 Subject: [PATCH 2/6] pinned getsentry/action-release version --- .github/workflows/deploy-staging.yml | 2 +- .github/workflows/deploy.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy-staging.yml b/.github/workflows/deploy-staging.yml index f53ebf6..69a2fb0 100644 --- a/.github/workflows/deploy-staging.yml +++ b/.github/workflows/deploy-staging.yml @@ -56,7 +56,7 @@ jobs: run: echo ${{ env.BRANCH_NAME }} - name: Create Sentry release - uses: getsentry/action-release@v1 + uses: getsentry/action-release@e769183448303de84c5a06aaaddf9da7be26d6c7 env: SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} SENTRY_ORG: ${{ secrets.SENTRY_ORG }} diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 3ec6d26..be77e31 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -57,7 +57,7 @@ jobs: run: echo ${{ env.BRANCH_NAME }} - name: Create Sentry release - uses: getsentry/action-release@v1 + uses: getsentry/action-release@e769183448303de84c5a06aaaddf9da7be26d6c7 env: SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} SENTRY_ORG: ${{ secrets.SENTRY_ORG }} From 44613f39219a7f893a9f81ac8f804c25321e1d3d Mon Sep 17 00:00:00 2001 From: Michael Della Bitta Date: Fri, 20 Dec 2024 14:36:24 -0500 Subject: [PATCH 3/6] pinned aws-actions/amazon-ecr-login --- .github/workflows/deploy-staging.yml | 2 +- .github/workflows/deploy.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy-staging.yml b/.github/workflows/deploy-staging.yml index 69a2fb0..2167cd6 100644 --- a/.github/workflows/deploy-staging.yml +++ b/.github/workflows/deploy-staging.yml @@ -21,7 +21,7 @@ jobs: - name: Login to Amazon ECR id: login-ecr - uses: aws-actions/amazon-ecr-login@v2 + uses: aws-actions/amazon-ecr-login@062b18b96a7aff071d4dc91bc00c4c1a7945b076 - name: Set up JDK 1.8 uses: actions/setup-java@v4 diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index be77e31..9777a3e 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -22,7 +22,7 @@ jobs: - name: Login to Amazon ECR id: login-ecr - uses: aws-actions/amazon-ecr-login@v2 + uses: aws-actions/amazon-ecr-login@062b18b96a7aff071d4dc91bc00c4c1a7945b076 - name: Set up JDK 1.8 uses: actions/setup-java@v4 From 1fed3e5a53e49d32a5e73ea57df194fcab46470f Mon Sep 17 00:00:00 2001 From: Michael Della Bitta Date: Fri, 20 Dec 2024 14:37:37 -0500 Subject: [PATCH 4/6] pinned aws-actions/configure-aws-credentials --- .github/workflows/deploy-staging.yml | 2 +- .github/workflows/deploy.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy-staging.yml b/.github/workflows/deploy-staging.yml index 2167cd6..0ce1ec3 100644 --- a/.github/workflows/deploy-staging.yml +++ b/.github/workflows/deploy-staging.yml @@ -13,7 +13,7 @@ jobs: uses: actions/checkout@v4 - name: Configure AWS credentials - uses: aws-actions/configure-aws-credentials@v4 + uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 9777a3e..a8253cd 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -14,7 +14,7 @@ jobs: uses: actions/checkout@v4 - name: Configure AWS credentials - uses: aws-actions/configure-aws-credentials@v2 + uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} From ecccf059ac5b3ee7a1b3b8c8c5921a26e21ee650 Mon Sep 17 00:00:00 2001 From: Michael Della Bitta Date: Fri, 20 Dec 2024 15:49:37 -0500 Subject: [PATCH 5/6] more pinned gh actions --- .github/workflows/deploy-staging.yml | 4 ++-- .github/workflows/deploy.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/deploy-staging.yml b/.github/workflows/deploy-staging.yml index 0ce1ec3..9f2bcca 100644 --- a/.github/workflows/deploy-staging.yml +++ b/.github/workflows/deploy-staging.yml @@ -31,13 +31,13 @@ jobs: cache: sbt - name: Set up QEMU - uses: docker/setup-qemu-action@v2 + uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf with: image: tonistiigi/binfmt:latest platforms: arm64,arm - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@6524bf65af31da8d45b59e8c27de4bd072b392f5 - name: Build JAR run: sbt assembly diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index a8253cd..25b4ed0 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -32,13 +32,13 @@ jobs: cache: sbt - name: Set up QEMU - uses: docker/setup-qemu-action@v2 + uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf with: image: tonistiigi/binfmt:latest platforms: arm64,arm - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@6524bf65af31da8d45b59e8c27de4bd072b392f5 - name: Build JAR run: sbt assembly From 1e1c8e3992c3d96759cf59f69d519c8d8888e7c6 Mon Sep 17 00:00:00 2001 From: Michael Della Bitta Date: Fri, 20 Dec 2024 16:05:30 -0500 Subject: [PATCH 6/6] fixed staging environment and runs-on --- .github/workflows/deploy-staging.yml | 4 ++-- .github/workflows/deploy.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy-staging.yml b/.github/workflows/deploy-staging.yml index 9f2bcca..bf649f7 100644 --- a/.github/workflows/deploy-staging.yml +++ b/.github/workflows/deploy-staging.yml @@ -5,8 +5,8 @@ on: jobs: deploy: name: Deploy Staging - runs-on: ubuntu-latest - environment: production + runs-on: ubuntu-22.04 + environment: staging steps: - name: Checkout diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 25b4ed0..83c1fe3 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -6,7 +6,7 @@ jobs: deploy: name: Deploy - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 environment: production steps: