PR should build but not deploy

This commit is contained in:
Baptiste Augrain
2021-03-10 16:48:45 +01:00
parent f8eeb2b698
commit 3e50a25606
5 changed files with 46 additions and 16 deletions

17
check_cron_or_pr.sh Normal file
View File

@@ -0,0 +1,17 @@
#!/bin/bash
set -e
if [[ $github.event.number ]]; then
# it's a PR
export SHOULD_BUILD="yes"
export SHOULD_DEPLOY="no"
else
export SHOULD_DEPLOY="yes"
fi
if [[ $GITHUB_ENV ]]; then
echo "SHOULD_BUILD=$SHOULD_BUILD" >> $GITHUB_ENV
echo "SHOULD_DEPLOY=$SHOULD_DEPLOY" >> $GITHUB_ENV
fi