Skip to content

Commit 617310d

Browse files
committed
debugging
1 parent c730127 commit 617310d

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

container-action/entrypoint.sh

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,38 @@ REPO_OWNER="${INPUT_REPO_OWNER:-rsksmart}" # Default to 'rsksmart' if not provi
99
IS_RSKJ_BRANCH=$(git ls-remote "https://github.com/$REPO_OWNER/rskj.git" "$RSKJ_BRANCH")
1010
IS_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+
1244
echo -e "\n\n--------- Input parameters received ---------\n\n"
1345
echo "RSKJ_BRANCH=$RSKJ_BRANCH"
1446
echo "POWPEG_NODE_BRANCH=$POWPEG_NODE_BRANCH"

0 commit comments

Comments
 (0)