build: push event are detected to avoid premature deployment (#808)

This commit is contained in:
Baptiste Augrain 2021-08-27 18:26:59 +02:00 committed by GitHub
parent 96332714ae
commit 72363757b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 4 deletions

View File

@ -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

View File

@ -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