-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/v1.6-dev' into feat/sdk-retry-br…
…oadcast
- Loading branch information
Showing
20 changed files
with
464 additions
and
248 deletions.
There are no files selected for viewing
This file contains 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,49 @@ | ||
--- | ||
name: "aws_credentials" | ||
description: | | ||
Configure .aws/credentials file with provided access key ID and secret access key. | ||
This action creates a credentials file in ${HOME}/.aws/credentials with the provided access key ID and secret access key. | ||
It also sets AWS_PROFILE and AWS_SHARED_CREDENTIALS_FILE environment variables to use this profile. | ||
It can conflict with other actions that define AWS credentials or set AWS_PROFILE env variable. | ||
Explicitly set AWS_PROFILE=sccache and unset AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY in case | ||
of conflicting settings. | ||
inputs: | ||
access_key_id: | ||
description: Access key ID | ||
required: true | ||
secret_access_key: | ||
description: Secret access key | ||
required: true | ||
profile: | ||
description: AWS profile to use; set AWS_PROFILE env variable to use this profile | ||
default: "default" | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Configure AWS credentials | ||
shell: bash | ||
run: | | ||
mkdir -p "${HOME}/.aws" | ||
cat >> ${HOME}/.aws/credentials << EOF | ||
[${{ inputs.profile }}] | ||
aws_access_key_id=${{ inputs.access_key_id }} | ||
aws_secret_access_key=${{ inputs.secret_access_key }} | ||
EOF | ||
chmod -R go-rwx ${HOME}/.aws | ||
- name: Set env variables | ||
shell: bash | ||
run: | | ||
# Exit on any error | ||
set -euo pipefail | ||
# Validate AWS_PROFILE is not empty | ||
if [ -z "${{ inputs.profile }}" ]; then | ||
echo "Error: AWS_PROFILE cannot be empty" | ||
exit 1 | ||
fi | ||
# Export variables | ||
echo "AWS_PROFILE=${{ inputs.profile }}" >> $GITHUB_ENV | ||
echo "AWS_SHARED_CREDENTIALS_FILE=${HOME}/.aws/credentials" >> $GITHUB_ENV |
This file contains 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,42 @@ | ||
--- | ||
# Login to AWS ECR | ||
name: "aws_ecr_login" | ||
description: "Login to AWS ECR to store Docker containers" | ||
inputs: | ||
aws_account_id: | ||
description: AWS account ID (AWS_ACCOUNT_ID) | ||
required: true | ||
aws_access_key_id: | ||
description: Access key ID (AWS_ACCESS_KEY_ID) | ||
required: true | ||
aws_secret_access_key: | ||
description: Secret access key (AWS_SECRET_ACCESS_KEY) | ||
required: true | ||
aws_region: | ||
description: AWS region to use (AWS_REGION) | ||
required: true | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Configure AWS credentials and bucket region | ||
uses: aws-actions/configure-aws-credentials@v4 | ||
with: | ||
aws-access-key-id: ${{ inputs.aws_access_key_id }} | ||
aws-secret-access-key: ${{ inputs.aws_secret_access_key }} | ||
aws-region: ${{ inputs.aws_region }} | ||
|
||
- name: Login to ECR | ||
run: | | ||
aws ecr get-login-password \ | ||
--region ${{ inputs.aws_region }} | docker login --username AWS --password-stdin ${{ inputs.aws_account_id }}.dkr.ecr.${{ inputs.aws_region }}.amazonaws.com | ||
shell: bash | ||
|
||
# Unset AWS credentials to avoid conflicts, as we prefer credentials from ~/.aws/credentials to authenticate | ||
- name: Unset AWS credentials to avoid conflicts | ||
shell: bash | ||
run: | | ||
echo AWS_DEFAULT_REGION='' >> $GITHUB_ENV | ||
echo AWS_REGION='' >> $GITHUB_ENV | ||
echo AWS_ACCESS_KEY_ID='' >> $GITHUB_ENV | ||
echo AWS_SECRET_ACCESS_KEY='' >> $GITHUB_ENV |
This file contains 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
This file contains 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
This file contains 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 |
---|---|---|
|
@@ -31,7 +31,7 @@ runs: | |
fi | ||
echo "TOOLCHAIN_VERSION=$TOOLCHAIN_VERSION" >> $GITHUB_ENV | ||
echo "::set-output name=version::$TOOLCHAIN_VERSION" | ||
echo "version=$TOOLCHAIN_VERSION" >> $GITHUB_OUTPUT | ||
- uses: dtolnay/rust-toolchain@master | ||
name: Install Rust toolchain | ||
|
@@ -82,12 +82,6 @@ runs: | |
echo "PROTOC=${HOME}/.local/bin/protoc" >> $GITHUB_ENV | ||
export PATH="${PATH}:${HOME}/.local/bin" | ||
- name: Install sccache-cache | ||
uses: mozilla-actions/[email protected] | ||
with: | ||
version: "v0.8.2" # Must be the same as in Dockerfile | ||
if: inputs.cache == 'true' | ||
|
||
- name: Set HOME variable to github context | ||
shell: bash | ||
run: echo "HOME=$HOME" >> $GITHUB_ENV | ||
|
This file contains 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.