Skip to content

Build

Build #109

Workflow file for this run

name: Build
on:
workflow_dispatch:
env:
REGISTRY: 289115055556.dkr.ecr.us-east-1.amazonaws.com
IMAGE_NAME: wet-toast-talk-radio
IMAGE_NAME_GPU: wet-toast-talk-radio-gpu
DOCKER_BUILDKIT: 1
jobs:
build:
name: ECR Build
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Docker Build
run: |
docker build -t wettoast . -f ./docker/cpu/Dockerfile
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: arn:aws:iam::289115055556:role/GitHubActionsWetToastTalkRadio
aws-region: us-east-1
- name: Docker Push
run: |
aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin 289115055556.dkr.ecr.us-east-1.amazonaws.com
docker tag wettoast:latest ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:commit-$GITHUB_SHA
docker push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:commit-$GITHUB_SHA
build-gpu:
name: ECR Build GPU
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Docker Build
run: |
docker build -t wettoast-gpu . -f ./docker/gpu/Dockerfile
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: arn:aws:iam::289115055556:role/GitHubActionsWetToastTalkRadio
aws-region: us-east-1
- name: Docker Push
run: |
aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin 289115055556.dkr.ecr.us-east-1.amazonaws.com
docker tag wettoast-gpu:latest ${{ env.REGISTRY }}/${{ env.IMAGE_NAME_GPU }}:commit-$GITHUB_SHA
docker push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME_GPU }}:commit-$GITHUB_SHA