-
Notifications
You must be signed in to change notification settings - Fork 0
ci #24
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
ci #24
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,31 @@ | ||||||||||||||||||||||||
| name: Deploy front end (ECS force new deployment) | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| on: | ||||||||||||||||||||||||
| workflow_dispatch: | ||||||||||||||||||||||||
| # push: | ||||||||||||||||||||||||
| # branches: | ||||||||||||||||||||||||
| # - "master" | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| permissions: | ||||||||||||||||||||||||
| id-token: write | ||||||||||||||||||||||||
| contents: read | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| jobs: | ||||||||||||||||||||||||
| deploy: | ||||||||||||||||||||||||
| runs-on: ubuntu-latest | ||||||||||||||||||||||||
| steps: | ||||||||||||||||||||||||
| - name: Configure AWS credentials (OIDC) | ||||||||||||||||||||||||
| uses: aws-actions/configure-aws-credentials@v4 | ||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||
| role-to-assume: ${{secrets.AWS_ROLE_TO_ASSUME}} | ||||||||||||||||||||||||
| aws-region: ${{vars.AWS_REGION}} | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| - name: Force new deployment (frontend) | ||||||||||||||||||||||||
| env: | ||||||||||||||||||||||||
| AWS_PAGER: "" | ||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||
| aws ecs update-service \ | ||||||||||||||||||||||||
| --cluster cre-examples-cluster \ | ||||||||||||||||||||||||
| --service cre-examples-frontend \ | ||||||||||||||||||||||||
| --force-new-deployment \ | ||||||||||||||||||||||||
|
||||||||||||||||||||||||
| --force-new-deployment \ | |
| --force-new-deployment \ | |
| --region ${{vars.AWS_REGION}} | |
| - name: Wait for ECS service to become stable (frontend) | |
| env: | |
| AWS_PAGER: "" | |
| run: | | |
| aws ecs wait services-stable \ | |
| --cluster cre-examples-cluster \ | |
| --services cre-examples-frontend \ |
Copilot
AI
Jan 26, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The --region flag in the AWS CLI command is redundant because the region is already configured in the AWS credentials setup step (line 21). When credentials are configured with aws-region, all subsequent AWS CLI commands in that job will use that region automatically. Removing this redundant flag would make the code cleaner and avoid potential confusion if the two region values ever differ.
| --force-new-deployment \ | |
| --region ${{vars.AWS_REGION}} | |
| --force-new-deployment |
Copilot
AI
Jan 26, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing consistent spacing in the GitHub expressions. Throughout this file, expressions like ${{secrets.AWS_ROLE_TO_ASSUME}} don't have spaces around the content. However, looking at other workflow files in the repository (e.g., docker-fe.yml lines 32-33, 41-42), the convention is to use spaces: ${{ vars.DOCKERHUB_USERNAME }}. The expressions should follow the established convention of including spaces for consistency.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The cluster name and service name are hardcoded. These should be parameterized using GitHub variables (similar to how AWS_REGION is handled) to improve maintainability and allow easier configuration changes without modifying the workflow file. Consider using ${{vars.AWS_ECS_CLUSTER}} and ${{vars.AWS_ECS_SERVICE_FRONTEND}} or similar variable names.