From 0bab641fb52c3fa8ff9f925de09280b5fe46f3af Mon Sep 17 00:00:00 2001 From: Dylan Madisetti Date: Thu, 11 Apr 2024 20:14:06 -0400 Subject: [PATCH] Update sync.yml --- .github/workflows/sync.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/sync.yml b/.github/workflows/sync.yml index 2f25a19e..8e871304 100644 --- a/.github/workflows/sync.yml +++ b/.github/workflows/sync.yml @@ -53,18 +53,16 @@ jobs: # if main doesn't exist we should make it (new template) git rev-parse --verify origin/main || { git checkout -b main && git push origin main; - ERROR=$(gh issue create -a '${{ github.actor }}' -t "finish setting up template" -F ./.github/template_todo.md 2>&1) - # Check if the command succeeded or failed - if [[ $? -ne 0 ]]; then # if the command failed + ERROR=$(gh issue create -a '${{ github.actor }}' -t "finish setting up template" -F ./.github/template_todo.md 2>&1) || { # If a "403" is in the output, then perform the following commands if [[ -n "$ERROR" ]] && echo "$ERROR" | grep -q "403"; then - # cat .github/workflow-setup.md >> $GITHUB_STEP_SUMMARY + cat .github/workflow-setup.md >> $GITHUB_STEP_SUMMARY echo "# Auth probz" >> $GITHUB_STEP_SUMMARY fi echo "\n---" >> $GITHUB_STEP_SUMMARY echo "the raw error: $ERROR" >> $GITHUB_STEP_SUMMARY exit 1 # make the script fail - fi + } } echo "::endgroup::" env: