Skip to content

Commit

Permalink
Fix nightly to use correct var
Browse files Browse the repository at this point in the history
Signed-off-by: Ethan Dye <mrtops03@gmail.com>
  • Loading branch information
ecdye committed Dec 6, 2024
1 parent e6219a6 commit 7d6bb51
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,20 @@ jobs:
COMMIT="$(git rev-list --after="24 hours" ${{ github.sha }} -- '**/*.swift' | head -n 1)"
if [[ ${{ github.event_name }} == "workflow_dispatch" ]]; then
echo "Manual run"
echo "should_run=true" >> $GITHUB_ENV
echo "should_run=true" >> $GITHUB_OUTPUT
elif [[ -z "$COMMIT" ]]; then
echo "No changes"
echo "should_run=false" >> $GITHUB_ENV
echo "should_run=false" >> $GITHUB_OUTPUT
else
echo "Normal run"
STATUS="$(gh api -H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
"/repos/ecdye/macSubtitleOCR/actions/runs?branch=main&head_sha=${COMMIT}&status=completed" | \
jq -r '.workflow_runs[] | select(.name == "Test") | .conclusion')"
if [[ "$STATUS" == "success" ]]; then
echo "should_run=true" >> $GITHUB_ENV
echo "should_run=true" >> $GITHUB_OUTPUT
else
echo "should_run=false" >> $GITHUB_ENV
echo "should_run=false" >> $GITHUB_OUTPUT
fi
fi
Expand Down

0 comments on commit 7d6bb51

Please sign in to comment.