From 26cd75b52bb5d901d5bba3c1e672cd13a4455175 Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Wed, 13 Dec 2023 10:43:26 +0100 Subject: [PATCH] ci: improve s3 build step --- .github/workflows/docker-image.yml | 39 +++++++++++------------------- 1 file changed, 14 insertions(+), 25 deletions(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index f374d1e0f6..7ef90d7996 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -187,30 +187,6 @@ jobs: # run: docker kill ${{ steps.docker-container.outputs.id }} # if: always() - deploy_s3: - needs: [build_ee] - runs-on: ubicloud - if: github.event_name != 'pull_request' - env: - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 - with: - node-version: 18 - - uses: shrink/actions-docker-extract@v3 - id: extract - with: - image: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-ee:latest - path: "/static_frontend/." - - - uses: reggionick/s3-deploy@v3 - with: - folder: ${{ steps.extract.outputs.destination }} - bucket: windmill-frontend - bucket-region: us-east-1 - attach_amd64_binary_to_release: needs: [build, build_ee] runs-on: ubicloud @@ -299,7 +275,7 @@ jobs: ${{ steps.extract.outputs.destination }}/* ${{ steps.extract-ee.outputs.destination }}/* - publish_ecr: + publish_ecr_s3: needs: [build_ee] runs-on: ubicloud if: github.event_name != 'pull_request' @@ -326,3 +302,16 @@ jobs: docker buildx imagetools create \ --tag ${{ env.ECR_REGISTRY }}/${{ env.IMAGE_NAME }}-ee:${git_hash:0:7} \ ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-ee:latest + + - uses: shrink/actions-docker-extract@v3 + id: extract + with: + image: + ${{ env.ECR_REGISTRY }}/${{ env.IMAGE_NAME }}-ee:${git_hash:0:7} + path: "/static_frontend/." + + - uses: reggionick/s3-deploy@v3 + with: + folder: ${{ steps.extract.outputs.destination }} + bucket: windmill-frontend + bucket-region: us-east-1