File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # Code artifact get auth token
2+
3+ This action authenticates with aws code artifact and get the token.
4+ Then the token will be injected into environment variable ` CODEARTIFACT_AUTH_TOKEN ` .
5+
6+ Note: This action only works on ` infra1-runners-arc ` .
7+
8+ ## Inputs
9+
10+ * None*
11+
12+ ## Outputs
13+
14+ * None*
15+
16+ ## Example usage
17+
18+ ```
19+ name: Run gradle check
20+
21+ on:
22+ pull_request:
23+
24+ jobs:
25+ check:
26+ runs-on:
27+ group: infra1-runners-arc
28+ labels: runners-small
29+ steps:
30+ - uses: actions/checkout@v3
31+
32+ - uses: gooddata/github-actions/codeartifact/get-token@master
33+
34+ - name: Setup Gradle
35+ uses: gradle/actions/setup-gradle@v3
36+
37+ - name: Check
38+ run: ./gradlew -I src/init.d/init.gradle.kts check --scan
39+ ```
Original file line number Diff line number Diff line change 1+ ---
2+ name : " Get code artifact authen token"
3+ description : " Get code artifact authen token"
4+ runs :
5+ using : " composite"
6+ steps :
7+ - name : CODEARTIFACT_AUTH_TOKEN
8+ shell : bash
9+ run : |
10+ CODEARTIFACT_AUTH_TOKEN=`
11+ aws codeartifact get-authorization-token \
12+ --domain infra1 \
13+ --domain-owner 020413372491 \
14+ --region us-east-1 --query authorizationToken --output text`
15+ echo "CODEARTIFACT_AUTH_TOKEN=$CODEARTIFACT_AUTH_TOKEN" >> $GITHUB_ENV
16+ echo "::add-mask::$CODEARTIFACT_AUTH_TOKEN"
You can’t perform that action at this time.
0 commit comments