if [ -n "${{ secrets.PAUSE_EXTERNAL_TRIGGER_PLEX_MASTER }}" ]; then
echo "**** Github secret PAUSE_EXTERNAL_TRIGGER_PLEX_MASTER is set; skipping trigger. ****"
echo "Github secret \`PAUSE_EXTERNAL_TRIGGER_PLEX_MASTER\` is set; skipping trigger." >> $GITHUB_STEP_SUMMARY
exit 0
fi
echo "**** External trigger running off of master branch. To disable this trigger, set a Github secret named \"PAUSE_EXTERNAL_TRIGGER_PLEX_MASTER\". ****"
echo "External trigger running off of master branch. To disable this trigger, set a Github secret named \`PAUSE_EXTERNAL_TRIGGER_PLEX_MASTER\`" >> $GITHUB_STEP_SUMMARY
if [ -n "${{ secrets.PAUSE_PACKAGE_TRIGGER_PLEX_MASTER }}" ]; then
echo "**** Github secret PAUSE_PACKAGE_TRIGGER_PLEX_MASTER is set; skipping trigger. ****"
echo "Github secret \`PAUSE_PACKAGE_TRIGGER_PLEX_MASTER\` is set; skipping trigger." >> $GITHUB_STEP_SUMMARY
exit 0
fi
if [ $(curl -s https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-plex/job/master/lastBuild/api/json | jq -r '.building') == "true" ]; then
echo "**** There already seems to be an active build on Jenkins; skipping package trigger ****"
echo "There already seems to be an active build on Jenkins; skipping package trigger" >> $GITHUB_STEP_SUMMARY
exit 0
fi
echo "**** Package trigger running off of master branch. To disable, set a Github secret named \"PAUSE_PACKAGE_TRIGGER_PLEX_MASTER\". ****"
echo "Package trigger running off of master branch. To disable, set a Github secret named \`PAUSE_PACKAGE_TRIGGER_PLEX_MASTER\`" >> $GITHUB_STEP_SUMMARY