From 71201badaf316ba376847b459777fb31b029489f Mon Sep 17 00:00:00 2001 From: Masaki Nakano Date: Wed, 7 Feb 2024 14:31:23 +0900 Subject: [PATCH] exit with error code if gh-federation failed --- action.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 0b0e61d..98b144c 100644 --- a/action.yml +++ b/action.yml @@ -39,13 +39,15 @@ runs: const accessToken = data["token"]; core.setSecret(accessToken); core.exportVariable("GH_FEDERATION_ACCESS_TOKEN", accessToken); - break; + return; } catch (e) { console.log(`retrying (remain: ${RETRY_MAX - i})...`); continue; } } + core.setFailed('The request was not successful') + - name: Store access token shell: bash run: |