From 06503deef4ccdf93410b42998bdb061dbb51eb52 Mon Sep 17 00:00:00 2001 From: me-no-dev Date: Tue, 11 Apr 2023 15:59:44 +0300 Subject: [PATCH] Support repository dispatch based on ESP-IDF tag --- tools/repository_dispatch.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/repository_dispatch.sh b/tools/repository_dispatch.sh index a920f5b..8b2d1b8 100644 --- a/tools/repository_dispatch.sh +++ b/tools/repository_dispatch.sh @@ -9,11 +9,12 @@ EVENT_JSON=`cat "$GITHUB_EVENT_PATH"` action=`echo "$EVENT_JSON" | jq -r '.action'` payload=`echo "$EVENT_JSON" | jq -r '.client_payload'` branch=`echo "$payload" | jq -r '.branch'` +tag=`echo "$payload" | jq -r '.tag'` commit=`echo "$payload" | jq -r '.commit'` builder=`echo "$payload" | jq -r '.builder'` arduino=`echo "$payload" | jq -r '.arduino'` -echo "Action: $action, Branch: $branch, Commit: $commit, Builder: $builder" +echo "Action: $action, Branch: $branch, Tag: $tag, Commit: $commit, Builder: $builder, Arduino: $arduino" if [ ! "$action" == "deploy" ] && [ ! "$action" == "build" ]; then echo "Bad Action $action" @@ -26,6 +27,8 @@ if [ ! "$commit" == "" ] && [ ! "$commit" == "null" ]; then export IDF_COMMIT="$commit" else commit="" + if [ ! "$tag" == "" ] && [ ! "$tag" == "null" ]; then + export IDF_TAG="$tag" if [ ! "$branch" == "" ] && [ ! "$branch" == "null" ]; then export IDF_BRANCH="$branch" fi