From a6c7f0791b5a4510b8b6eb0f0cd124702c8bc1c5 Mon Sep 17 00:00:00 2001 From: cberg-aot <93226309+cberg-aot@users.noreply.github.com> Date: Tue, 24 Sep 2024 15:55:34 -0700 Subject: [PATCH] feat: supporting release events (#9) --- action.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/action.yml b/action.yml index 5381fad..7fe9075 100644 --- a/action.yml +++ b/action.yml @@ -47,6 +47,15 @@ runs: https://api.github.com/repos/${{ github.repository }}/commits/${{ github.event.after }}/pulls \ | jq .[0].number ) + elif [ ${{ github.event_name }} == 'release' ] + then + echo "Event type: release" + pr=$(\ + curl -sL -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{ inputs.token }}" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + https://api.github.com/repos/${{ github.repository }}/commits/${{ github.event.after }}/pulls \ + | jq .[0].number + ) if [ -z "${pr}" ] then