diff --git a/entrypoint.sh b/entrypoint.sh index ad572dc..20b186a 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -15,11 +15,18 @@ # See the License for the specific language governing permissions and # limitations under the License. # ######################################################################## -env | grep ARGO +set -o xtrace + +if [[ "${GITHUB_EVENT_NAME}" != "pull_request" ]] +then + BRANCH_NAME=${GITHUB_REF} +else + BRANCH_NAME=${GITHUB_HEAD_REF} +fi WORKFLOW_NAME=`argo submit -v -o json --from wftmpl/${1} -n ${2} -l workflows.argoproj.io/workflow-template=${1} --argo-base-href '' \ -p ci-repository-url="git@github.com:${GITHUB_REPOSITORY}.git" \ - -p ci-commit-sha=${GITHUB_SHA} -p delay-destroy=${3} \ + -p ci-commit-sha=${BRANCH_NAME} -p delay-destroy=${3} \ -p addon-url="${4}" \ -p job-name=${5} \ -p splunk-version=${6} \