Skip to content

Commit

Permalink
feat(git-actions) aws ecr
Browse files Browse the repository at this point in the history
  • Loading branch information
DiegoPorfirio01 committed Aug 3, 2024
1 parent 3913421 commit 31ab1dc
Showing 1 changed file with 20 additions and 9 deletions.
29 changes: 20 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,30 @@ jobs:
SHA=$(echo $GITHUB_SHA | head -c7)
echo "sha=$SHA" >> $GITHUB_OUTPUT
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{secrets.DOCKERHUB_USERNAME}}
password: ${{secrets.DOCKERHUB_TOKEN}}
# - name: Login to Docker Hub
# uses: docker/login-action@v3
# with:
# username: ${{secrets.DOCKERHUB_USERNAME}}
# password: ${{secrets.DOCKERHUB_TOKEN}}

# - name: Build Docker Image
# run: docker build -t wiredworldweb/wired:${{steps.generate_tag.outputs.sha}} .

# - name: Push image
# run: docker push
- name: Build and push
uses: docker/build-push-action@v6
# - name: Build and push
# uses: docker/build-push-action@v6
# with:
# push: true
# tags: wiredworldweb/wired:${{steps.generate_tag.outputs.sha}},wiredworldweb/wired:latest

- name: Configure AWS Credentials for China region audience
uses: aws-actions/configure-aws-credentials@v4
with:
push: true
tags: wiredworldweb/wired:${{steps.generate_tag.outputs.sha}},wiredworldweb/wired:latest
# audience: sts.amazonaws.com.cn
aws-region: us-east-2
role-to-assume: 'arn:aws:iam::163547640766:role/ecr_role '

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

0 comments on commit 31ab1dc

Please sign in to comment.