From fec734a67055134cb7164809e590f9d53ca55367 Mon Sep 17 00:00:00 2001 From: IG Date: Mon, 8 Jan 2024 13:19:13 +0000 Subject: [PATCH] get last run_id of a completed run --- .github/workflows/release-docs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-docs.yml b/.github/workflows/release-docs.yml index db76d337..c2a458ab 100644 --- a/.github/workflows/release-docs.yml +++ b/.github/workflows/release-docs.yml @@ -27,7 +27,7 @@ jobs: 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') + | jq '.workflow_runs[] | select(.status=="completed") | .id' | head -1) echo "::set-output name=run-id::$run_id" - name: ⬇️ Download last artifacts from build.yml