Deploy to AWS #5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy to AWS | |
env: | |
AWS_REGION: 'us-east-1' | |
on: | |
workflow_dispatch: | |
jobs: | |
push: | |
name: Build & Push Base Container Image | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
id-token: write | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Fetch AWS Credentials | |
uses: aws-actions/configure-aws-credentials@v3 | |
with: | |
role-to-assume: arn:aws:iam::218200003247:role/DeployCodemodderImagesRole | |
role-session-name: github | |
aws-region: ${{ env.AWS_REGION }} | |
- name: Login to Amazon ECR | |
id: login-ecr | |
uses: aws-actions/amazon-ecr-login@v1 | |
- name: Build & Push Base Image | |
# TODO: we really should tag with a specific version as well, but that will come later | |
run: | | |
docker buildx build --push -t ${{ steps.login-ecr.outputs.registry }}/pixee/codemodder-python:latest . |