Skip to content

Commit

Permalink
add debug prints
Browse files Browse the repository at this point in the history
  • Loading branch information
LKajan committed Nov 12, 2024
1 parent cf51a9d commit cd629cf
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,16 @@ jobs:
SKIP_DEPLOY=false
# Get the PR number where the commit was introduced in
PR_NUMBER=$(gh pr list --repo ${{ github.repository }} --search ${{ github.sha }} --state merged --json number --jq '.[0].number')
echo "The commit was introduced in PR $PR_NUMBER".
if [ -n "$PR_NUMBER" ]; then
LABELS=$(gh pr view --repo ${{ github.repository }} $PR_NUMBER --json labels --jq '.labels[].name')
echo "The PR has the following labels: $(echo "$LABELS" | sed 's/^\|$/"/g' | paste -sd, -)."
if echo "$LABELS" | grep -q "skip deploy"; then
SKIP_DEPLOY=true
fi
fi
echo "skip-deploy=$SKIP_DEPLOY" >> $GITHUB_OUTPUT
echo "skip-deploy: $SKIP_DEPLOY"
define-environment:
runs-on: ubuntu-latest
Expand Down

0 comments on commit cd629cf

Please sign in to comment.