-
Notifications
You must be signed in to change notification settings - Fork 110
SRE-197, SRE-198, BE-233: Add reusable GitHub Action for ECS service redeployment #8169
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
TimDiekmann
merged 8 commits into
main
from
t/sre-198-trigger-service-redeployment-from-hash-repository
Dec 12, 2025
Merged
Changes from 1 commit
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
7085670
Add redeploy ECS service action and update deployment workflow
TimDiekmann 5d742d9
Fix environment variable usage in ECS service redeployment action
TimDiekmann 92b6077
Comment out dependencies for testing
TimDiekmann 92e847c
Refactor deployment role ARNs in workflow for staging and production β¦
TimDiekmann 8ac49b5
Add staging and production redeploy actions for API and worker services
TimDiekmann 4d4a870
Update hash-backend-cd.yml
TimDiekmann 32bc513
Add healthcheck endpoint and enable test server build argument
TimDiekmann f02c9a1
Add staging redeploy action for graph-test service and update environβ¦
TimDiekmann File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| name: Redeploy ECS service | ||
| description: Force a new ECS service deployment with optional role assumption | ||
|
|
||
| inputs: | ||
| AWS_ACCESS_KEY_ID: | ||
| description: AWS access key id | ||
| required: true | ||
| AWS_SECRET_ACCESS_KEY: | ||
| description: AWS secret access key | ||
| required: true | ||
| AWS_SESSION_TOKEN: | ||
| description: AWS session token | ||
| required: true | ||
| AWS_REGION: | ||
| description: AWS region | ||
| required: true | ||
| ECS_CLUSTER_NAME: | ||
| description: ECS cluster name | ||
| required: true | ||
| ECS_SERVICE_NAME: | ||
| description: ECS service name | ||
| required: true | ||
| ROLE_ARN: | ||
| description: IAM role ARN to assume for deployment (cross-account) | ||
| required: false | ||
|
|
||
| runs: | ||
| using: composite | ||
| steps: | ||
| - name: Configure AWS credentials | ||
| uses: aws-actions/configure-aws-credentials@7474bc4690e29a8392af63c5b98e7449536d5c3a # v4.3.1 | ||
| with: | ||
| aws-access-key-id: ${{ inputs.AWS_ACCESS_KEY_ID }} | ||
| aws-secret-access-key: ${{ inputs.AWS_SECRET_ACCESS_KEY }} | ||
| aws-session-token: ${{ inputs.AWS_SESSION_TOKEN }} | ||
| aws-region: ${{ inputs.AWS_REGION }} | ||
| role-to-assume: ${{ inputs.ROLE_ARN }} | ||
| role-duration-seconds: ${{ inputs.ROLE_DURATION_SECONDS }} | ||
|
|
||
| - name: Redeploy ECS service | ||
| shell: bash | ||
| run: | | ||
| aws ecs update-service \ | ||
| --cluster "${{ inputs.ECS_CLUSTER_NAME }}" \ | ||
| --service "${{ inputs.ECS_SERVICE_NAME }}" \ | ||
| --force-new-deployment 1> /dev/null | ||
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.