Skip to content

Commit

Permalink
Use PowerShell for checking for PR
Browse files Browse the repository at this point in the history
  • Loading branch information
elzik committed Oct 30, 2023
1 parent 3a0a69f commit 9cc4676
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions .github/workflows/continuous-delivery.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,18 +40,18 @@ jobs:
id: prcheck
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
shell: bash
run: |
prs=$(gh pr list \
--repo "$GITHUB_REPOSITORY" \
--json baseRefName,headRefName \
--jq '
map(select(.baseRefName == "main" and .headRefName == "${{ github.ref_name }}"))
| length
')
if ((prs > 0)); then
echo "pull_request_exists=true" >> "$GITHUB_OUTPUT"
fi
$prs = $(gh pr list `
--repo "$env:GITHUB_REPOSITORY" `
--json baseRefName,headRefName `
--jq '
map(select(.baseRefName == "main" and .headRefName == $env:github_ref_name))
| length
')
if ($prs -gt 0) {
Add-Content -Path $env:GITHUB_OUTPUT -Value "pull_request_exists=true"
}
shell: pwsh
- name: Tag With SemVer
id: tag
if: github.ref_name == 'main'
Expand Down

0 comments on commit 9cc4676

Please sign in to comment.