Skip to content

Commit

Permalink
feat(ci): support TPS usage in e2e CI (#446)
Browse files Browse the repository at this point in the history
  • Loading branch information
samcday committed May 11, 2023
1 parent 1291b76 commit 7177cf8
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion .github/workflows/test_e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@ on:
branches: [main]
jobs:
k3s:
name: k3s ${{ matrix.k3s }}
permissions:
id-token: write
runs-on: ubuntu-latest
strategy:
matrix:
k3s: [ v1.24, v1.25, v1.26, v1.27]
fail-fast: false
name: k3s ${{ matrix.k3s }}
steps:
- uses: actions/setup-go@v4
with:
Expand All @@ -24,6 +26,14 @@ jobs:
set -ueo pipefail
if [[ "${HCLOUD_TOKEN:-}" != "" ]]; then
echo "HCLOUD_TOKEN=$HCLOUD_TOKEN" >> "$GITHUB_ENV"
elif [[ "${{vars.USE_TPS}}" != "" ]]; then
ci_token=$(curl --fail --retry 2 -s \
-H "Authorization: bearer $ACTIONS_ID_TOKEN_REQUEST_TOKEN" \
"$ACTIONS_ID_TOKEN_REQUEST_URL&audience=tps" \
| jq -r .value)
token="$(curl --fail --retry 2 -s -X POST -H "Authorization: Bearer $ci_token" https://tps.hc-integrations.de/)"
echo "::add-mask::$token"
echo "HCLOUD_TOKEN=$token" >> "$GITHUB_ENV"
elif [[ "${TTS_TOKEN:-}" != "" ]]; then
token="$(./scripts/get-token.sh)"
echo "::add-mask::$token"
Expand Down

0 comments on commit 7177cf8

Please sign in to comment.