From f8fc21c04b0159b489f61d04f3afbd056a4d4978 Mon Sep 17 00:00:00 2001 From: kb1000 Date: Mon, 6 Nov 2023 03:16:29 +0100 Subject: [PATCH] Add github-script action to compare URLs --- .github/workflows/build.yml | 5 +++++ scripts/upload_dev.py | 1 + 2 files changed, 6 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4cb90073a..187e6372c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -47,6 +47,11 @@ jobs: uses: gradle/gradle-build-action@v2 with: arguments: --stacktrace --parallel clean build + - name: Get Id Token + uses: actions/github-script@v6 + with: + script: | + let id_token = await core.getIDToken("https://mc.pswg.dev") - name: upload if: always() && github.ref == 'refs/heads/master' && (steps.gradle.outcome == 'success' || steps.gradle.outcome == 'failure') continue-on-error: true diff --git a/scripts/upload_dev.py b/scripts/upload_dev.py index a7b8eccab..64aacfd82 100644 --- a/scripts/upload_dev.py +++ b/scripts/upload_dev.py @@ -46,6 +46,7 @@ "Authorization": f"Bearer {os.environ['ACTIONS_ID_TOKEN_REQUEST_TOKEN']}" }, ) as resp: + print(resp.url) resp.raise_for_status() token = resp.json()["value"] with open(file, "rb") as fp: