Skip to content

Commit 0605163

Browse files
Merge pull request #2 from dima-asana/patch-1
Add support for fedramp authentication
2 parents 8c1335c + dfa7bca commit 0605163

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

action.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@ inputs:
44
github-app-name:
55
description: The name of the Github app that you'd like to retrieve a token for
66
required: true
7+
partition:
8+
description: What partition the authorization is for
9+
default: 'commercial'
10+
type: choice
11+
options:
12+
- commercial
13+
- fedramp
714
outputs:
815
app-token:
916
description: The app installation access token, which you can use to authenticate your requests to Github
@@ -24,8 +31,14 @@ runs:
2431
id: get_token
2532
env:
2633
TEMP_DIR: ${{ runner.temp }}
27-
LAMBDA_FUNCTION_URL: "https://s5mfys5te5aks7kw7p54vmbhvu0vyqlw.lambda-url.us-east-1.on.aws/"
34+
COMMERCIAL_LAMBDA_FUNCTION_URL: "https://s5mfys5te5aks7kw7p54vmbhvu0vyqlw.lambda-url.us-east-1.on.aws/"
35+
FEDRAMP_LAMBDA_FUNCTION_URL: "https://x4ltsnejil7dy6quaim6pn2iue0ewclt.lambda-url.us-east-1.on.aws/"
2836
run: |
37+
if [[ ${{ inputs.partition }}== "fedramp" ]]; then
38+
LAMBDA_FUNCTION_URL=$FEDRAMP_LAMBDA_FUNCTION_URL
39+
else
40+
LAMBDA_FUNCTION_URL=$COMMERCIAL_LAMBDA_FUNCTION_URL
41+
fi
2942
TOKEN_FILE="$TEMP_DIR/token.json"
3043
DATA='{"github_app_name":"${{ inputs.github-app-name }}"}'
3144
echo "DATA: $DATA"

0 commit comments

Comments
 (0)