-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: improve all credentials providers
- Loading branch information
Showing
71 changed files
with
6,630 additions
and
1,290 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 |
---|---|---|
|
@@ -8,6 +8,10 @@ on: | |
defaults: | ||
run: | ||
shell: bash | ||
|
||
permissions: | ||
id-token: write | ||
|
||
jobs: | ||
build: | ||
|
||
|
@@ -37,6 +41,19 @@ jobs: | |
|
||
- name: Install dependencies | ||
run: composer install --prefer-dist --no-progress --no-suggest | ||
|
||
- name: Setup OIDC | ||
run: npm install @actions/[email protected] @actions/http-client | ||
|
||
- name: Get Id Token | ||
uses: actions/github-script@v7 | ||
id: idtoken | ||
with: | ||
script: | | ||
const coreDemo = require('@actions/core'); | ||
const idToken = await coreDemo.getIDToken('sts.aliyuncs.com'); | ||
const fsx = require('fs/promises'); | ||
await fsx.writeFile('/tmp/oidc_token', idToken); | ||
- name: Run test case | ||
run: composer test | ||
|
@@ -46,7 +63,13 @@ jobs: | |
ROLE_ARN: ${{ secrets.ROLE_ARN }} | ||
PUBLIC_KEY_ID: ${{ secrets.PUBLIC_KEY_ID }} | ||
PRIVATE_KEY_LINE_1: ${{ secrets.PRIVATE_KEY_LINE_1 }} | ||
|
||
# for OIDC | ||
ALIBABA_CLOUD_OIDC_PROVIDER_ARN: ${{ secrets.ALIBABA_CLOUD_OIDC_PROVIDER_ARN }} | ||
ALIBABA_CLOUD_OIDC_TOKEN_FILE: "/tmp/oidc_token" | ||
ALIBABA_CLOUD_ROLE_ARN: ${{ secrets.OIDC_ROLE_ARN }} | ||
|
||
- name: Upload Coverage Report | ||
uses: codecov/codecov-action@v4 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} # required | ||
token: ${{ secrets.CODECOV_TOKEN }} # required |
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
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
Oops, something went wrong.