0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-11-21 13:39:22 +01:00

push image

This commit is contained in:
Bryan Ciaraldi 2024-11-20 10:52:10 -08:00
parent 3fff547528
commit fc649d8034

View File

@ -12,7 +12,7 @@ concurrency:
jobs:
posthog_build:
name: Build Docker image
name: Build and Push Docker Image to ECR
runs-on: ubuntu-latest
permissions:
id-token: write # allow issuing OIDC tokens for this workflow run
@ -37,10 +37,27 @@ jobs:
- name: Check out
uses: actions/checkout@v3
- name: Build and cache Docker image in Depot
uses: ./.github/actions/build-n-cache-image
# Configure AWS credentials
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
actions-id-token-request-url: ${{ env.ACTIONS_ID_TOKEN_REQUEST_URL }}
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1
- name: Login to Amazon ECR
id: aws-ecr
uses: aws-actions/amazon-ecr-login@v2
- name: Build and push container image
id: build
uses: depot/build-push-action@v1
with:
buildx-fallback: false # the fallback is so slow it's better to just fail
push: true
tags: ${{ steps.aws-ecr.outputs.registry }}/posthog-cloud:${{ github.sha }}
platforms: linux/arm64,linux/amd64
build-args: COMMIT_HASH=${{ github.sha }}
deploy_preview:
name: Deploy preview environment