Skip to content

Commit

Permalink
ci:(wf) add fix to ci to aws ecr
Browse files Browse the repository at this point in the history
  • Loading branch information
masamarux committed Jul 21, 2024
1 parent ed9e235 commit 41f6b51
Showing 1 changed file with 20 additions and 10 deletions.
30 changes: 20 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,27 @@ jobs:
SHA=$(echo ${GITHUB_SHA} | head -c7)
echo "sha=${SHA}" >> $GITHUB_OUTPUT
- name: Login into container registry
uses: docker/login-action@v3
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v6
with:
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/masa-api:${{ steps.generate_tag.outputs.sha }},${{ secrets.DOCKERHUB_USERNAME }}/masa-api:latest
role-to-assume: arn:aws:iam::961957158866:role/ecr-role
aws-region: us-east-2

- name: Login to AWS ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v2

# - name: Login into container registry
# uses: docker/login-action@v3
# with:
# username: ${{ secrets.DOCKERHUB_USERNAME }}
# password: ${{ secrets.DOCKERHUB_TOKEN }}

# - name: Build and push
# uses: docker/build-push-action@v6
# with:
# push: true
# tags: ${{ secrets.DOCKERHUB_USERNAME }}/masa-api:${{ steps.generate_tag.outputs.sha }},${{ secrets.DOCKERHUB_USERNAME }}/masa-api:latest

# - name: Build docker image
# run: docker build -t ${{ secrets.DOCKERHUB_USERNAME }}/masa-api:${{ steps.generate_tag.outputs.sha }} .
Expand Down

0 comments on commit 41f6b51

Please sign in to comment.