ci: improve s3 build step

This commit is contained in:
Ruben Fiszel
2023-12-13 10:43:26 +01:00
parent 0b7b84d590
commit 26cd75b52b
+14 -25
View File
@@ -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