docker compose setup (#162)
Co-authored-by: Kerem Yilmaz <kerem@skyvern.com>
This commit is contained in:
53
.github/workflows/build-docker-image.yml
vendored
Normal file
53
.github/workflows/build-docker-image.yml
vendored
Normal file
@@ -0,0 +1,53 @@
|
||||
name: Build Docker Image and Push to ECR
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [ published ]
|
||||
|
||||
env:
|
||||
AWS_REGION: us-east-1
|
||||
ECR_REPOSITORY: skyvern
|
||||
REGISTRY_ALIAS: t6d4b5t4 # skyvern
|
||||
|
||||
jobs:
|
||||
run-ci:
|
||||
uses: ./.github/workflows/ci.yml
|
||||
|
||||
build-docker-image:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [ run-ci ]
|
||||
steps:
|
||||
- name: Check out Git repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Configure AWS credentials
|
||||
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 }}
|
||||
aws-region: ${{ env.AWS_REGION }}
|
||||
|
||||
- name: Login to Amazon ECR Public
|
||||
id: login-ecr-public
|
||||
uses: aws-actions/amazon-ecr-login@v2
|
||||
with:
|
||||
registry-type: public
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
|
||||
- name: Build, tag, and push image to Amazon Public ECR
|
||||
id: build-image
|
||||
uses: docker/build-push-action@v2
|
||||
env:
|
||||
ECR_REGISTRY: ${{ steps.login-ecr-public.outputs.registry }}
|
||||
with:
|
||||
context: .
|
||||
platforms: |
|
||||
linux/amd64
|
||||
linux/arm64
|
||||
push: true
|
||||
tags: |
|
||||
${{ env.ECR_REGISTRY}}/${{ env.REGISTRY_ALIAS }}/${{ env.ECR_REPOSITORY }}:${{ github.sha }}
|
||||
${{ env.ECR_REGISTRY}}/${{ env.REGISTRY_ALIAS }}/${{ env.ECR_REPOSITORY }}:${{ github.event.release.tag_name }}
|
||||
${{ env.ECR_REGISTRY}}/${{ env.REGISTRY_ALIAS }}/${{ env.ECR_REPOSITORY }}:latest
|
||||
1
.github/workflows/ci.yml
vendored
1
.github/workflows/ci.yml
vendored
@@ -4,6 +4,7 @@ name: Run tests and pre-commit
|
||||
# `branches: [main], then this actions runs _twice_ on pull requests, which is
|
||||
# annoying.
|
||||
on:
|
||||
workflow_call:
|
||||
pull_request:
|
||||
push:
|
||||
branches: [main]
|
||||
|
||||
Reference in New Issue
Block a user