-
-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: test aws signer with web loader (#342)
- Loading branch information
Showing
2 changed files
with
83 additions
and
44 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 |
---|---|---|
|
@@ -138,17 +138,14 @@ jobs: | |
- name: Install cargo-nextest | ||
run: curl -LsSf https://get.nexte.st/latest/linux | tar zxf - -C ${CARGO_HOME:-~/.cargo}/bin | ||
|
||
- name: Install OIDC Client from Core Package | ||
run: npm install @actions/[email protected] @actions/http-client | ||
- name: Get Id Token | ||
uses: actions/github-script@v6 | ||
id: idtoken | ||
with: | ||
script: | | ||
const client = require('@actions/core') | ||
let id_token = await client.getIDToken('sts.tencentcloudapi.com') | ||
client.exportVariable('GITHUB_ID_TOKEN', id_token) | ||
client.setSecret(id_token) | ||
let id_token = await core.getIDToken('sts.tencentcloudapi.com') | ||
core.exportVariable('GITHUB_ID_TOKEN', id_token) | ||
core.setSecret(id_token) | ||
- name: Test | ||
run: cargo nextest run --no-fail-fast | ||
|
@@ -162,3 +159,37 @@ jobs: | |
REQSIGN_TENCENT_COS_ROLE_ARN: ${{ secrets.REQSIGN_TENCENT_COS_ROLE_ARN }} | ||
REQSIGN_TENCENT_COS_PROVIDER_ID: ${{ secrets.REQSIGN_TENCENT_COS_PROVIDER_ID }} | ||
REQSIGN_TENCENT_COS_REGION: ${{ secrets.REQSIGN_TENCENT_COS_REGION }} | ||
|
||
test_aws_web_identity: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: "read" | ||
id-token: "write" | ||
if: github.event_name == 'push' || !github.event.pull_request.head.repo.fork | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Install cargo-nextest | ||
run: curl -LsSf https://get.nexte.st/latest/linux | tar zxf - -C ${CARGO_HOME:-~/.cargo}/bin | ||
|
||
- name: Get Id Token | ||
uses: actions/github-script@v6 | ||
id: idtoken | ||
with: | ||
script: | | ||
let id_token = await core.getIDToken('sts.amazonaws.com') | ||
core.exportVariable('GITHUB_ID_TOKEN', id_token) | ||
core.setSecret(id_token) | ||
- name: Test | ||
run: cargo nextest run --no-fail-fast | ||
env: | ||
RUST_LOG: DEBUG | ||
RUST_BACKTRACE: full | ||
REQSIGN_AWS_V4_TEST: ${{ secrets.REQSIGN_AWS_V4_TEST }} | ||
REQSIGN_AWS_V4_SERVICE: ${{ secrets.REQSIGN_AWS_V4_SERVICE }} | ||
REQSIGN_AWS_V4_URL: ${{ secrets.REQSIGN_AWS_V4_URL }} | ||
REQSIGN_AWS_V4_REGION: ${{ secrets.REQSIGN_AWS_V4_REGION }} | ||
REQSIGN_AWS_V4_ACCESS_KEY: ${{ secrets.REQSIGN_AWS_V4_ACCESS_KEY }} | ||
REQSIGN_AWS_V4_SECRET_KEY: ${{ secrets.REQSIGN_AWS_V4_SECRET_KEY }} | ||
REQSIGN_AWS_ROLE_ARN: ${{ secrets.REQSIGN_AWS_ROLE_ARN }} | ||
REQSIGN_AWS_PROVIDER_ARN: ${{ secrets.REQSIGN_AWS_PROVIDER_ARN }} |
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
e28d700
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Deploy preview for reqsign ready!
✅ Preview
https://reqsign-4yyaru5yl-xuanwo.vercel.app
Built with commit e28d700.
This pull request is being automatically deployed with vercel-action