Skip to content

Commit

Permalink
Ops 6495 fix issue playwright test (#35)
Browse files Browse the repository at this point in the history
* OPS-6495-print the exit status of the if statement

* OPS-6495-determine whether the branch exists or not using  --exit-code command

* OPS-6495-determine whether the branch exists or not using  --exit-code command

* OPS-6495-Verify whether using GITHUB_ENV is more appropriate for setting environment variables, as GITHUB_OUTPUT

* OPS-6495-use GITHUB_OUTPUT instaed of GITHUB_ENV

* OPS-6495-clean the workflow
  • Loading branch information
sahassou authored May 17, 2024
1 parent 7e47857 commit 769dfd6
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -254,16 +254,16 @@ jobs:
- name: Check current branch
run: |
echo "Current branch: ${{ github.ref_name }}"
- name: Check if Playwright branch exists
id: check_branch
run: |
playwright_branch="${{ github.ref_name }}"
if git ls-remote --heads https://github.com/dBildungsplattform/schulportal-testautomatisierung $playwright_branch &> /dev/null; then
if git ls-remote --heads --exit-code https://github.com/dBildungsplattform/schulportal-testautomatisierung $playwright_branch &> /dev/null; then
echo "playwright_branch=$playwright_branch" >> $GITHUB_OUTPUT
else
echo "playwright_branch=main" >> $GITHUB_OUTPUT
fi
echo "Branch exists: $?"
run_playwright_tests:
needs:
Expand All @@ -274,5 +274,4 @@ jobs:
secrets: inherit
with:
frontendHostname: "${{ needs.create_lowercase_ingress_prefix.outputs.namespace_from_branch }}.dev.spsh.dbildungsplattform.de"
playwright_branch: ${{ needs.determine_playwright_branch.outputs.playwright_branch || fromJSON('{"value":"main"}').value }}

playwright_branch: ${{ needs.determine_playwright_branch.outputs.playwright_branch || 'main' }}

0 comments on commit 769dfd6

Please sign in to comment.