Skip to content

Commit

Permalink
Fix the status embed workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
ItsDrike committed May 23, 2024
1 parent edf130f commit 0b5d002
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
19 changes: 19 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion .github/workflows/status_embed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
1 change: 1 addition & 0 deletions changes/300.internal.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 0b5d002

Please sign in to comment.