dispatch-with-artifacts #109
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: "Home-CI External Test Results Processing" | |
| on: | |
| repository_dispatch: | |
| types: [dispatch-with-artifacts] | |
| jobs: | |
| process-test-results: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Initialize | |
| run: mkdir -p test-artifacts | |
| - name: Install home-ci-reporter | |
| run: | | |
| go install github.com/k8s-school/home-ci-reporter@v0.0.2-rc4 | |
| - name: Extract and Decode Artifacts | |
| run: | | |
| PATH=$(go env GOPATH)/bin:$PATH | |
| echo '${{ toJson(github.event.client_payload) }}' > payload.json | |
| home-ci-reporter extract payload.json test-artifacts | |
| - name: Upload Artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: external-results-${{ github.event.client_payload.artifact_name }} | |
| path: test-artifacts/ | |
| retention-days: 30 | |
| - name: Generate Summary Metadata | |
| run: | | |
| PATH=$(go env GOPATH)/bin:$PATH | |
| home-ci-reporter summary payload.json | |
| - name: Parse E2E Report | |
| run: | | |
| PATH=$(go env GOPATH)/bin:$PATH | |
| report_path="test-artifacts/e2e-report.yaml" | |
| if [ -f "$report_path" ]; then | |
| home-ci-reporter parse "$report_path" | |
| else | |
| echo "⚠️ No \`e2e-report.yaml\` found." >> $GITHUB_STEP_SUMMARY | |
| exit 1 | |
| fi | |
| - name: Final Result Logic | |
| run: | | |
| if [ "${{ github.event.client_payload.success }}" != "true" ]; then | |
| exit 1 | |
| fi |