-
Notifications
You must be signed in to change notification settings - Fork 47
chore: add AWS deployment release workflow #441
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
Closed
Closed
Changes from all commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
7d71544
feat: add an deployment workflow to AWS
collins-w 5e7e24f
feat: add an deployment workflow to AWS
collins-w 75b0240
feat: specify pnpm version
collins-w bf88354
chore: fix cache
collins-w 8debe47
chore: fix docker context
collins-w 1f1513a
chore: separate fund and sequence accounts commands
collins-w 59045d6
chore: separate fund and sequence accounts commands
collins-w 0f3e716
chore: fix the docker context
collins-w 1a26c68
chore: fix the plugin path
collins-w 2e53cae
chore: fix the ecr name
collins-w b219cfa
chore: refactor workflow
collins-w 6138f4f
chore: fix the exec format error on arm64
collins-w 509b498
chore: fix the exec format error
collins-w 8f1f7bc
chore: fix the exec format error
collins-w 068aa05
chore: remove the ecs deployment workflow
collins-w f2bba50
chore: revert docker changes
collins-w 5d27dce
chore: copy the config file in dockerfile
collins-w 1c9d27a
chore: optionally bake the config files
collins-w 0fe824a
chore: optionally bake the config files
collins-w fbc6dae
chore: optionally bake the config files
collins-w 24f81ef
chore: optionally bake the config files
collins-w 478ad7f
chore: add missing configs
collins-w 7ff9d0f
chore: optionally include launchtube
collins-w 03d882f
chore: optionally include launchtube
collins-w 6fb4dfb
chore: optionally include launchtube
collins-w 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,45 @@ | ||
| --- | ||
| name: AWS OIDC Credentials via Role Assume Chaining | ||
| description: Retrieve AWS credentials by chaining role assumes | ||
| inputs: | ||
| role-for-oidc: | ||
| description: The role that should be used for GitHub OIDC authentication | ||
| required: true | ||
| role-to-assume: | ||
| description: The role that should be finally assumed | ||
| required: true | ||
| role-session-name: | ||
| description: The session name that should be used when assuming roles | ||
| required: true | ||
| default: github-actions | ||
| role-duration-seconds: | ||
| description: duration of the credentials validity | ||
| required: true | ||
| default: 3600 | ||
| aws-region: | ||
| description: The AWS region | ||
| required: false | ||
| default: us-east-1 | ||
|
|
||
| runs: | ||
| using: composite | ||
| steps: | ||
| - name: assume oidc role | ||
| uses: aws-actions/configure-aws-credentials@ececac1a45f3b08a01d2dd070d28d111c5fe6722 # v4.1.0 | ||
| with: | ||
| aws-region: us-east-1 | ||
| role-to-assume: ${{ inputs.role-for-oidc }} | ||
| role-session-name: ${{ inputs.role-session-name }} | ||
| role-duration-seconds: 900 | ||
| - name: assume target role | ||
| uses: aws-actions/configure-aws-credentials@ececac1a45f3b08a01d2dd070d28d111c5fe6722 # v4.1.0 | ||
| id: assume-target-role | ||
| with: | ||
| aws-access-key-id: ${{ env.AWS_ACCESS_KEY_ID }} | ||
| aws-secret-access-key: ${{ env.AWS_SECRET_ACCESS_KEY }} | ||
| aws-session-token: ${{ env.AWS_SESSION_TOKEN }} | ||
| aws-region: ${{ inputs.aws-region }} | ||
| role-chaining: true | ||
| role-to-assume: ${{ inputs.role-to-assume }} | ||
| role-session-name: ${{ inputs.role-session-name }} | ||
| role-duration-seconds: ${{ inputs.role-duration-seconds }} | ||
|
Comment on lines
+35
to
+45
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Mask account IDs and align duration defaults. Add masking to reduce info disclosure in logs; optionally make the first-step duration configurable for consistency. - name: assume oidc role
uses: aws-actions/configure-aws-credentials@ececac1a45f3b08a01d2dd070d28d111c5fe6722 # v4.1.0
with:
- aws-region: us-east-1
+ aws-region: ${{ inputs.aws-region }}
role-to-assume: ${{ inputs.role-for-oidc }}
role-session-name: ${{ inputs.role-session-name }}
- role-duration-seconds: 900
+ role-duration-seconds: 900
+ mask-aws-account-id: true
- name: assume target role
uses: aws-actions/configure-aws-credentials@ececac1a45f3b08a01d2dd070d28d111c5fe6722 # v4.1.0
id: assume-target-role
with:
aws-access-key-id: ${{ env.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ env.AWS_SECRET_ACCESS_KEY }}
aws-session-token: ${{ env.AWS_SESSION_TOKEN }}
aws-region: ${{ inputs.aws-region }}
role-chaining: true
role-to-assume: ${{ inputs.role-to-assume }}
role-session-name: ${{ inputs.role-session-name }}
role-duration-seconds: ${{ inputs.role-duration-seconds }}
+ mask-aws-account-id: true
🤖 Prompt for AI Agents |
||
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 |
|---|---|---|
|
|
@@ -17,9 +17,29 @@ runs: | |
| uses: dtolnay/[email protected] # v1.86.0 | ||
| with: | ||
| components: ${{ (inputs.components != '') && format('{0}, rustfmt, clippy', inputs.components) || 'rustfmt, clippy' }} | ||
|
|
||
| - name: Install libsodium | ||
| run: sudo apt-get update && sudo apt-get install -y libsodium-dev | ||
| shell: bash | ||
|
|
||
| - name: Restore cargo dependencies from cache | ||
| uses: Swatinem/rust-cache@f0deed1e0edfc6a9be95417288c0e1099b1eeec3 # v2.7.7 | ||
| id: cache | ||
|
|
||
| - uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0 | ||
| with: | ||
| run_install: false | ||
| version: 10 | ||
|
|
||
| - name: Use node@22 | ||
| uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 | ||
| with: | ||
| node-version: 22.18.0 | ||
|
|
||
| - name: Build launchtube plugin example | ||
| run: | | ||
| cd examples/launchtube-plugin-example/launchtube | ||
| pnpm install | ||
| pnpm run build | ||
| cd ../.. | ||
| shell: bash | ||
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.
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.
Don’t hardcode region; use the input across both steps.
Using
us-east-1here while allowing a region input elsewhere causes inconsistent AWS_REGION in jobs.📝 Committable suggestion
🤖 Prompt for AI Agents