Skip to content

Commit

Permalink
changed some things
Browse files Browse the repository at this point in the history
  • Loading branch information
emiliaup committed Apr 30, 2024
1 parent 97a744f commit 54a5255
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions .github/workflows/build-and-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,24 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::381492107876:role/IIC2173
aws-region: us-east-1
# - name: Configure AWS Credentials
# uses: aws-actions/configure-aws-credentials@v4
# with:
# aws-access-key-id:
# aws-secret-access-key:
# role-to-assume: arn:aws:iam::381492107876:role/IIC2173
# aws-region: us-east-1

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{secrets.AWS_ACCESS_KEY_ID0}}
aws-secret-access-key: ${{secrets.AWS_SECRET_ACCESS_KEY0}}
aws-region: us-east-1

# - name: Get ECR Repository URI
# id: ecr-repo
# run: |
# echo "::set-output name=uri::public.ecr.aws/v9b5f4l8/iic2173-api"
# # Use the URI directly, assuming it's constant
- name: Get ECR Repository URI
id: ecr-repo
run: |
echo "::set-output name=uri::public.ecr.aws/v9b5f4l8/iic2173-api"
# Use the URI directly, assuming it's constant
- name: Login to Amazon ECR
id: login-ecr-public
Expand All @@ -52,5 +53,6 @@ jobs:
REPOSITORY: iic2173-api
IMAGE_TAG: latest
run: |
docker build -t $REGISTRY/$REGISTRY_ALIAS/$REPOSITORY:$IMAGE_TAG ./api
cd api
docker build -t $REGISTRY/$REGISTRY_ALIAS/$REPOSITORY:$IMAGE_TAG .
docker push $REGISTRY/$REGISTRY_ALIAS/$REPOSITORY:$IMAGE_TAG

0 comments on commit 54a5255

Please sign in to comment.