Enhance snowflakeStageObjectName to handle relative application stage… #400
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Pull Request | |
| on: | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| changes: | |
| uses: ./.github/workflows/changes.yaml | |
| permissions: | |
| pull-requests: read | |
| contents: read | |
| node_tests: | |
| if: needs.changes.outputs.js == 'true' | |
| needs: [changes] | |
| uses: ./.github/workflows/node_test.yaml | |
| secrets: inherit | |
| go_tests: | |
| if: needs.changes.outputs.go == 'true' | |
| needs: [changes] | |
| uses: ./.github/workflows/go_test.yaml | |
| secrets: inherit | |
| build_e2e: | |
| if: needs.changes.outputs.e2e == 'true' && | |
| github.event.pull_request.head.repo.full_name == github.repository | |
| needs: [changes] | |
| with: | |
| build_e2e: true | |
| target: premium | |
| uses: ./.github/workflows/build.yaml | |
| permissions: | |
| contents: read | |
| packages: write | |
| secrets: inherit | |
| e2e_tests: | |
| if: needs.changes.outputs.e2e == 'true' && | |
| github.event.pull_request.head.repo.full_name == github.repository | |
| needs: [build_e2e] | |
| uses: ./.github/workflows/e2e.yaml | |
| with: | |
| target: premium | |
| permissions: | |
| contents: read | |
| packages: write | |
| secrets: inherit | |
| comment_results: | |
| if: always() && github.event_name == 'pull_request' | |
| needs: [node_tests, go_tests, e2e_tests] | |
| runs-on: ubuntu-latest | |
| permissions: | |
| pull-requests: write | |
| steps: | |
| - name: Comment PR with results | |
| uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| const results = { | |
| node_tests: '${{ needs.node_tests.result }}', | |
| go_tests: '${{ needs.go_tests.result }}', | |
| e2e_tests: '${{ needs.e2e_tests.result }}' | |
| }; | |
| const statusEmoji = { | |
| success: '✅', | |
| failure: '❌', | |
| skipped: '⏭️', | |
| cancelled: '🚫' | |
| }; | |
| let allPassed = true; | |
| let commentBody = '## CI Check Results\n\n'; | |
| for (const [job, result] of Object.entries(results)) { | |
| if (result !== 'skipped') { | |
| const emoji = statusEmoji[result] || '❓'; | |
| const jobName = job.replace(/_/g, ' ').replace(/\b\w/g, l => l.toUpperCase()); | |
| commentBody += `${emoji} **${jobName}**: ${result}\n`; | |
| if (result !== 'success') { | |
| allPassed = false; | |
| } | |
| } | |
| } | |
| if (allPassed) { | |
| commentBody += '\n✨ All checks passed successfully!'; | |
| } else { | |
| commentBody += '\n⚠️ Some checks failed. Please review the workflow run for details.'; | |
| } | |
| commentBody += `\n\n[View workflow run](${context.payload.repository.html_url}/actions/runs/${context.runId})`; | |
| await github.rest.issues.createComment({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| issue_number: context.issue.number, | |
| body: commentBody | |
| }); |