2021-03-10 10:48:45 -05:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
2022-06-05 15:30:23 -04:00
|
|
|
if [[ "${GITHUB_EVENT_NAME}" == "pull_request" ]]; then
|
2021-03-10 10:56:14 -05:00
|
|
|
echo "It's a PR"
|
2021-03-10 10:48:45 -05:00
|
|
|
|
2021-08-27 12:26:59 -04:00
|
|
|
export SHOULD_BUILD="yes"
|
|
|
|
export SHOULD_DEPLOY="no"
|
2022-06-05 15:30:23 -04:00
|
|
|
elif [[ "${GITHUB_EVENT_NAME}" == "push" ]]; then
|
2021-08-27 12:26:59 -04:00
|
|
|
echo "It's a Push"
|
|
|
|
|
2021-03-10 10:48:45 -05:00
|
|
|
export SHOULD_BUILD="yes"
|
|
|
|
export SHOULD_DEPLOY="no"
|
|
|
|
else
|
2021-03-10 10:56:14 -05:00
|
|
|
echo "It's a cron"
|
|
|
|
|
2021-03-10 10:48:45 -05:00
|
|
|
export SHOULD_DEPLOY="yes"
|
|
|
|
fi
|
|
|
|
|
2022-06-05 15:30:23 -04:00
|
|
|
if [[ "${GITHUB_ENV}" ]]; then
|
|
|
|
echo "SHOULD_BUILD=${SHOULD_BUILD}" >> "${GITHUB_ENV}"
|
|
|
|
echo "SHOULD_DEPLOY=${SHOULD_DEPLOY}" >> "${GITHUB_ENV}"
|
2021-03-10 10:48:45 -05:00
|
|
|
fi
|