diff options
| author | Dario Nieuwenhuis <[email protected]> | 2023-05-25 03:43:44 +0200 |
|---|---|---|
| committer | Dario Nieuwenhuis <[email protected]> | 2023-05-25 03:54:49 +0200 |
| commit | 2a589b79047a2431dd443d50c434e7f4767eab51 (patch) | |
| tree | 7377384699aeddcf6d629a35741b11a0c0f998ac | |
| parent | 5f10eadb8d13f59bceed0958ef7aac8f1545f30d (diff) | |
ci: replace openid connect with static secret.
The oidc token is only valid for 5min, builds are starting to fail because HIL tests
take more than 5 min and we only obtain it once at start.
Instead of fixing it, let's remove it. My hope for OIDC was to allow running
HIL tests on PRs from forks if the author is in a list of trusted users.
However GHA simply doesn't give the ID token to PRs from forks. :shrug:
Same limitation as with static tokens. So it's useless complexity, let's kill it.
| -rw-r--r-- | .github/workflows/rust.yml | 2 | ||||
| -rwxr-xr-x | ci.sh | 8 |
2 files changed, 4 insertions, 6 deletions
diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 47dc8fd7a..0cbca31b8 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml | |||
| @@ -36,6 +36,8 @@ jobs: | |||
| 36 | target_ci | 36 | target_ci |
| 37 | key: rust3-${{ runner.os }}-${{ hashFiles('rust-toolchain.toml') }} | 37 | key: rust3-${{ runner.os }}-${{ hashFiles('rust-toolchain.toml') }} |
| 38 | - name: build | 38 | - name: build |
| 39 | env: | ||
| 40 | TELEPROBE_TOKEN: ${{ secrets.TELEPROBE_TOKEN }} | ||
| 39 | run: | | 41 | run: | |
| 40 | curl -L -o /usr/local/bin/cargo-batch https://github.com/embassy-rs/cargo-batch/releases/download/batch-0.3.0/cargo-batch | 42 | curl -L -o /usr/local/bin/cargo-batch https://github.com/embassy-rs/cargo-batch/releases/download/batch-0.3.0/cargo-batch |
| 41 | chmod +x /usr/local/bin/cargo-batch | 43 | chmod +x /usr/local/bin/cargo-batch |
| @@ -160,12 +160,8 @@ function run_elf { | |||
| 160 | } | 160 | } |
| 161 | 161 | ||
| 162 | if [[ -z "${TELEPROBE_TOKEN-}" ]]; then | 162 | if [[ -z "${TELEPROBE_TOKEN-}" ]]; then |
| 163 | if [[ -z "${ACTIONS_ID_TOKEN_REQUEST_TOKEN-}" ]]; then | 163 | echo No teleprobe token found, skipping running HIL tests |
| 164 | echo No teleprobe token found, skipping running HIL tests | 164 | exit |
| 165 | exit | ||
| 166 | fi | ||
| 167 | |||
| 168 | export TELEPROBE_TOKEN=$(curl -sS -H "Authorization: Bearer $ACTIONS_ID_TOKEN_REQUEST_TOKEN" "$ACTIONS_ID_TOKEN_REQUEST_URL" | jq -r '.value') | ||
| 169 | fi | 165 | fi |
| 170 | 166 | ||
| 171 | for board in $(ls out/tests); do | 167 | for board in $(ls out/tests); do |
