fix: add aws login #18
Workflow file for this run
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: Solis Build & Push Image to Amazon ECR | |
on: | |
# push: | |
# branches: | |
# - main | |
# # TODO: remove this once merged into main | |
# pull_request: | |
# types: [synchronize, opened, reopened] | |
jobs: | |
build-and-push-solis-image: | |
runs-on: ubuntu-latest # This specifies the runner environment | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v2 | |
- name: Login to Amazon ECR | |
id: login-ecr | |
uses: aws-actions/amazon-ecr-login@v1 | |
with: | |
mask-password: true | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
AWS_ACCOUNT_ID: ${{ secrets.AWS_ACCOUNT_ID }} | |
AWS_REGION: ${{ secrets.AWS_REGION }} | |
- name: Build Solis, tag, and push image to Amazon ECR | |
run: | | |
docker buildx create --use --name ecr-deploy-builder-solis | |
docker buildx build --tag ${{ secrets.ECR_URL }}:solis-latest --file ./Dockerfile . --load | |
docker push ${{ secrets.ECR_URL }}:solis-latest |