diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1ff942a0..7d3aead4 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -19,3 +19,22 @@ jobs: unit-tests: uses: ./.github/workflows/unit-tests.yml + + # Produce a pull request payload artifact with various data about the + # pull-request event (such as the PR number, title, author, ...). + # This data is then be picked up by status-embed.yml action. + artifact: + steps: + - name: Prepare Pull Request Payload artifact + id: prepare-artifact + if: always() && github.event_name == 'pull_request' + continue-on-error: true + run: cat $GITHUB_EVENT_PATH | jq '.pull_request' > pull_request_payload.json + + - name: Upload a Build Artifact + if: always() && steps.prepare-artifact.outcome == 'success' + continue-on-error: true + uses: actions/upload-artifact@v4 + with: + name: pull-request-payload + path: pull_request_payload.json diff --git a/.github/workflows/status_embed.yml b/.github/workflows/status_embed.yml index b6882bf6..fea615e2 100644 --- a/.github/workflows/status_embed.yml +++ b/.github/workflows/status_embed.yml @@ -20,7 +20,7 @@ jobs: steps: # A workflow_run event does not contain all the information # we need for a PR embed. That's why we upload an artifact - # with that information in the Lint workflow. + # with that information in the CI workflow. - name: Get Pull Request Information id: pr_info if: github.event.workflow_run.event == 'pull_request' diff --git a/changes/300.internal.md b/changes/300.internal.md index eb170396..cb1372e3 100644 --- a/changes/300.internal.md +++ b/changes/300.internal.md @@ -3,3 +3,4 @@ - Trigger and run lint and unit-tests workflows form a single main CI workflow. - Only send status embed after the main CI workflow finishes (not for both unit-tests and validation) - Use `--output-format=github` for `ruff check` in the validation workflow +- Fix the status-embed workflow