removing refs/head
This commit is contained in:
@@ -44,7 +44,6 @@ check_events_json() {
|
|||||||
exit 1;
|
exit 1;
|
||||||
fi
|
fi
|
||||||
echo "Found ${GITHUB_EVENT_PATH}";
|
echo "Found ${GITHUB_EVENT_PATH}";
|
||||||
cat "${GITHUB_EVENT_PATH}"
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -73,6 +72,7 @@ main () {
|
|||||||
if [ -z "${BRANCH_PREFIX}" ]; then
|
if [ -z "${BRANCH_PREFIX}" ]; then
|
||||||
echo "No branch prefix is set, all branches will be used."
|
echo "No branch prefix is set, all branches will be used."
|
||||||
BRANCH_PREFIX=""
|
BRANCH_PREFIX=""
|
||||||
|
echo "Branch prefix is $BRANCH_PREFIX"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "${PULL_REQUEST_BRANCH}" ]; then
|
if [ -z "${PULL_REQUEST_BRANCH}" ]; then
|
||||||
@@ -82,11 +82,11 @@ main () {
|
|||||||
|
|
||||||
# Get the name of the action that was triggered
|
# Get the name of the action that was triggered
|
||||||
BRANCH=$(jq --raw-output .ref "${GITHUB_EVENT_PATH}");
|
BRANCH=$(jq --raw-output .ref "${GITHUB_EVENT_PATH}");
|
||||||
|
BRANCH=$(echo "${BRANCH/refs\/heads\//}")
|
||||||
echo "Found branch $BRANCH"
|
echo "Found branch $BRANCH"
|
||||||
|
|
||||||
# If it's to the target branch, ignore it
|
# If it's to the target branch, ignore it
|
||||||
if [[ "${BRANCH}" == "${PULL_REQUEST_BRANCH}" ]]; then
|
if [[ "${BRANCH}" == "${PULL_REQUEST_BRANCH}" ]]; then
|
||||||
|
|
||||||
echo "Target and current branch are identical (${BRANCH}), skipping."
|
echo "Target and current branch are identical (${BRANCH}), skipping."
|
||||||
else
|
else
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user