From ba09799ff9f302f651db33ca3ebf49902ddfd8a8 Mon Sep 17 00:00:00 2001 From: IG Date: Mon, 8 Jan 2024 13:13:47 +0000 Subject: [PATCH] attempt to get run id --- .github/workflows/release-docs.yml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release-docs.yml b/.github/workflows/release-docs.yml index a6ea5f83..fa134c66 100644 --- a/.github/workflows/release-docs.yml +++ b/.github/workflows/release-docs.yml @@ -21,13 +21,23 @@ jobs: steps: - # download artifacts from build.yml - - name: ⬇️ Download artifacts from latest workflow + - name: Get latest run ID + id: runid + run: | + run_id=$(curl --request GET \ + --url https://api.github.com/repos/${{ github.repository }}/actions/workflows/build.yml/runs \ + --header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' \ + | jq '.workflow_runs[0].id') + echo "::set-output name=run-id::$run_id" + + - run: echo ${{ steps.runid.outputs.run-id }} + + - name: ⬇️ Download last artifacts from build.yml uses: actions/download-artifact@v4 with: name: docs github-token: ${{ secrets.GH_PAT }} - run_id: todo + run-id: todo - name: 🔍 view artifacts to be used run: ls -R