Skip to content

Commit

Permalink
Passing props on failure
Browse files Browse the repository at this point in the history
  • Loading branch information
amankumarrr committed Mar 29, 2024
1 parent c27b42d commit 2a5ffd1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/daily-image-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
name: GitHub Issue
runs-on: ubuntu-latest
needs: check-broken-images
if: ${{ inputs.create_issue == true && failure() }}
if: ${{ inputs.create_issue == true && needs.check-broken-images.outputs.testPassed == 'False'}}
steps:
- name: Playwright Artifact
run: |
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/template-ui-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,16 @@ on:
artifact-id:
description: "Playwright Artifact ID"
value: ${{ jobs.test.outputs.artifact-id }}
testPassed:
description: "Test Passed"
value: ${{ jobs.test.outputs.testPassed }}

jobs:
test:
name: Run Playwright tests
runs-on: ubuntu-latest
outputs:
testPassed: ${{ steps.run.outputs.testPassed || 'True' }}
artifact-id: ${{ steps.artifact-report.outputs.artifact-id }}

steps:
Expand Down Expand Up @@ -57,7 +61,7 @@ jobs:
id: failure
if: failure() && steps.run.outcome == 'failure'
run: |
echo " This is output of preivous job ${{ steps.run.outcome }}"
echo " This is output of preivous job: ${{ steps.run.outcome }}"
echo "testPassed='False'" >> $env:GITHUB_OUTPUT
- uses: actions/upload-artifact@v4
Expand Down

0 comments on commit 2a5ffd1

Please sign in to comment.