File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,38 @@ REPO_OWNER="${INPUT_REPO_OWNER:-rsksmart}" # Default to 'rsksmart' if not provi
99IS_RSKJ_BRANCH=$( git ls-remote " https://github.com/$REPO_OWNER /rskj.git" " $RSKJ_BRANCH " )
1010IS_POWPEG_BRANCH=$( git ls-remote " https://github.com/$REPO_OWNER /powpeg-node.git" " $POWPEG_NODE_BRANCH " )
1111
12+ # Check if the branch exists
13+ if [ -n " $IS_RSKJ_BRANCH " ]; then
14+ echo " Branch '$RSKJ_BRANCH ' exists in repository '$REPO_OWNER /rskj.git'."
15+ else
16+ echo " Branch '$RSKJ_BRANCH ' does not exist in repository '$REPO_OWNER /rskj.git'."
17+ fi
18+
19+ if [ -n " $IS_POWPEG_BRANCH " ]; then
20+ echo " Branch '$POWPEG_NODE_BRANCH ' exists in repository '$REPO_OWNER /powpeg-node.git'."
21+ else
22+ echo " Branch '$POWPEG_NODE_BRANCH ' does not exist in repository '$REPO_OWNER /powpeg-node.git'."
23+ fi
24+
25+
26+ # Check if the branch exists
27+ # IS_RSKJ_BRANCH=$(curl -s -o /dev/null -w "%{http_code}" "https://api.github.com/repos/$REPO_OWNER/rskj/branches/$RSKJ_BRANCH")
28+
29+ # if [ "$IS_RSKJ_BRANCH" -eq 200 ]; then
30+ # echo "Branch '$RSKJ_BRANCH' exists in $REPO_OWNER/rskj.git"
31+ # else
32+ # echo "Branch '$RSKJ_BRANCH' does not exist in $REPO_OWNER/rskj.git"
33+ # fi
34+
35+ # IS_POWPEG_BRANCH=$(curl -s -o /dev/null -w "%{http_code}" "https://api.github.com/repos/$REPO_OWNER/powpeg-node/branches/$POWPEG_NODE_BRANCH")
36+
37+ # if [ "$IS_POWPEG_BRANCH" -eq 200 ]; then
38+ # echo "Branch '$POWPEG_NODE_BRANCH' exists in $REPO_OWNER/powpeg-node.git"
39+ # else
40+ # echo "Branch '$POWPEG_NODE_BRANCH' does not exist in $REPO_OWNER/powpeg-node.git"
41+ # fi
42+
43+
1244echo -e " \n\n--------- Input parameters received ---------\n\n"
1345echo " RSKJ_BRANCH=$RSKJ_BRANCH "
1446echo " POWPEG_NODE_BRANCH=$POWPEG_NODE_BRANCH "
You can’t perform that action at this time.
0 commit comments