Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,25 @@
#!/bin/bash
set -euo pipefail

# Map Docker action args to environment variables
INPUT_GIT_TOKEN="$1"
INPUT_PROTO_REPOSITORY="$2"
INPUT_PROTO_BRANCH="$3"
INPUT_MODULE_LIST_FILE_PATH="$4"
INPUT_AWS_S3_BUCKET="$5"
INPUT_AWS_REGION="$6"
INPUT_DEST_DIR="$7"
INPUT_AWS_ACCESS_KEY_ID="$8"
INPUT_AWS_SECRET_ACCESS_KEY="$9"
INPUT_AWS_ROLE_ARN="${10}"
INPUT_AWS_WEB_IDENTITY_TOKEN_FILE="${11}"

# Export them so downstream scripts can access
export INPUT_GIT_TOKEN INPUT_PROTO_REPOSITORY INPUT_PROTO_BRANCH INPUT_MODULE_LIST_FILE_PATH
export INPUT_AWS_S3_BUCKET INPUT_AWS_REGION INPUT_DEST_DIR
export INPUT_AWS_ACCESS_KEY_ID INPUT_AWS_SECRET_ACCESS_KEY
export INPUT_AWS_ROLE_ARN INPUT_AWS_WEB_IDENTITY_TOKEN_FILE

cd /action

echo "cloning protobuf files"
Expand Down
2 changes: 1 addition & 1 deletion sparse-checkout.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ cp $GITHUB_WORKSPACE/${INPUT_MODULE_LIST_FILE_PATH} .git/info/sparse-checkout
git remote add origin https://${INPUT_GIT_TOKEN}@github.com/${INPUT_PROTO_REPOSITORY}
git -c protocol.version=2 fetch --no-tags --prune --depth=1 origin ${BRANCH_NAME}
git checkout --force -B ${BRANCH_NAME} origin/${BRANCH_NAME}
cd ..
cd ..