Skip to content

modify github action ecr repo name #12

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 21 additions & 20 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ jobs:
build:
if: ${{ github.event.pull_request.merged }}
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

Expand Down Expand Up @@ -64,26 +65,26 @@ jobs:
run: |
docker push ${{ secrets.AWS_ACCOUNT_NUM }}.dkr.ecr.${{ env.REGION }}.amazonaws.com/sample:${{ steps.vars.outputs.sha_short }}

- name: Download task definition
run: |
aws ecs describe-task-definition --task-definition demo-tmcdapne2 --query taskDefinition > task-definition.json
# - name: Download task definition
# run: |
# aws ecs describe-task-definition --task-definition demo-tmcdapne2 --query taskDefinition > task-definition.json

- name: Fill in the new image ID in the Amazon ECS task definition
id: task-def
uses: aws-actions/amazon-ecs-render-task-definition@v1
with:
task-definition: task-definition.json
container-name: demo
image: ${{ secrets.AWS_ACCOUNT_NUM }}.dkr.ecr.${{ env.REGION }}.amazonaws.com/sample:${{ steps.vars.outputs.sha_short }}
# - name: Fill in the new image ID in the Amazon ECS task definition
# id: task-def
# uses: aws-actions/amazon-ecs-render-task-definition@v1
# with:
# task-definition: task-definition.json
# container-name: demo
# image: ${{ secrets.AWS_ACCOUNT_NUM }}.dkr.ecr.${{ env.REGION }}.amazonaws.com/sample:${{ steps.vars.outputs.sha_short }}

- name: Deploy to Amazon ECS
uses: aws-actions/amazon-ecs-deploy-task-definition@v2
with:
task-definition: ${{ steps.task-def.outputs.task-definition }}
service: demo-tmcdapne2
cluster: demo-tmcdapne2
wait-for-service-stability: true
codedeploy-appspec: appspec.json
codedeploy-application: demo_app
codedeploy-deployment-group: demo_app
# - name: Deploy to Amazon ECS
# uses: aws-actions/amazon-ecs-deploy-task-definition@v2
# with:
# task-definition: ${{ steps.task-def.outputs.task-definition }}
# service: demo-tmcdapne2
# cluster: demo-tmcdapne2
# wait-for-service-stability: true
# codedeploy-appspec: appspec.json
# codedeploy-application: demo_app
# codedeploy-deployment-group: demo_app

Loading