Skip to content

Commit

Permalink
Deploy to apprunner
Browse files Browse the repository at this point in the history
  • Loading branch information
unasuke committed Jun 15, 2024
1 parent 5609045 commit b90d016
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
env:
AWS_REGION: us-west-2
steps:
# - run: sudo apt-get update && sudo apt-get install jsonnet
- run: sudo apt-get update && sudo apt-get install jsonnet
- uses: actions/checkout@v4
- uses: aws-actions/configure-aws-credentials@v4
with:
Expand All @@ -58,5 +58,5 @@ jobs:
version: latest
- run: ecspresso run --config deploy/ecspresso.jsonnet --ext-str IMAGE_SHA=${{ github.sha }} --overrides-file deploy/runtask-db-migrate.jsonnet
- run: ecspresso deploy --config deploy/ecspresso.jsonnet --ext-str IMAGE_SHA=${{ github.sha }}
# - run: jsonnet deploy/apprunner.jsonnet --ext-str IMAGE_SHA=${{ github.sha }} > deploy/apprunner.json
# - run: aws apprunner update-service --cli-input-json file://deploy/apprunner.json
- run: jsonnet deploy/apprunner.jsonnet --ext-str IMAGE_SHA=${{ github.sha }} > deploy/apprunner.json
- run: aws apprunner update-service --cli-input-json file://deploy/apprunner.json
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,6 @@
yarn-debug.log*
.yarn-integrity
vendor

# auto generate file
deploy/apprunner.json
9 changes: 9 additions & 0 deletions deploy/apprunner.jsonnet
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
ServiceArn: 'arn:aws:apprunner:us-west-2:861452569180:service/sponsor-app/4a7434fdd538498a9dee83d76f7a497f',
SourceConfiguration: {
ImageRepository: {
ImageIdentifier: '861452569180.dkr.ecr.us-west-2.amazonaws.com/sponsor-app:' + std.extVar('IMAGE_SHA'),
ImageRepositoryType: 'ECR',
},
},
}

0 comments on commit b90d016

Please sign in to comment.