From 72363757b30a54f498fc7e1bc89d29e682b53966 Mon Sep 17 00:00:00 2001 From: Baptiste Augrain Date: Fri, 27 Aug 2021 18:26:59 +0200 Subject: [PATCH] build: push event are detected to avoid premature deployment (#808) --- check_cron_or_pr.sh | 5 +++++ get_repo.sh | 5 +---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/check_cron_or_pr.sh b/check_cron_or_pr.sh index 1a3743f..81936c0 100755 --- a/check_cron_or_pr.sh +++ b/check_cron_or_pr.sh @@ -5,6 +5,11 @@ set -e if [[ $GITHUB_EVENT_NAME == "pull_request" ]]; then echo "It's a PR" + export SHOULD_BUILD="yes" + export SHOULD_DEPLOY="no" +elif [[ $GITHUB_EVENT_NAME == "push" ]]; then + echo "It's a Push" + export SHOULD_BUILD="yes" export SHOULD_DEPLOY="no" else diff --git a/get_repo.sh b/get_repo.sh index e0f7822..722fb17 100755 --- a/get_repo.sh +++ b/get_repo.sh @@ -32,9 +32,6 @@ cd .. # for GH actions if [[ $GITHUB_ENV ]]; then - if [[ -z "${MS_TAG}" ]]; then - echo "MS_TAG=$MS_TAG" >> $GITHUB_ENV - fi - + echo "MS_TAG=$MS_TAG" >> $GITHUB_ENV echo "MS_COMMIT=$MS_COMMIT" >> $GITHUB_ENV fi