Skip to content

Commit

Permalink
CI: try to support-fork-repositories
Browse files Browse the repository at this point in the history
Signed-off-by: Jean Privat <[email protected]>
  • Loading branch information
privat committed Jun 27, 2024
1 parent 4ec8176 commit af90783
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 2 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/ci-results.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Test Results

on:
workflow_run:
workflows: ["CI"]
types:
- completed
permissions: {}

jobs:
test-results:
name: Test Results
runs-on: ubuntu-latest
if: github.event.workflow_run.conclusion != 'skipped'

permissions:
checks: write

# needed unless run with comment_mode: off
pull-requests: write

# required by download step to access artifacts API
actions: read

steps:
- name: Download and Extract Artifacts
uses: dawidd6/action-download-artifact@e7466d1a7587ed14867642c2ca74b5bcc1e19a2d
with:
run_id: ${{ github.event.workflow_run.id }}
path: artifacts

- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
with:
commit: ${{ github.event.workflow_run.head_sha }}
event_file: artifacts/Event File/event.json
event_name: ${{ github.event.workflow_run.event }}
files: "artifacts/**/*.xml"
15 changes: 13 additions & 2 deletions .github/workflows/makefile.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: Makefile CI
name: CI

on:
push:
pull_request:
env:
# BASIC_PACKAGES is used fo the basic tools (make)
Expand Down Expand Up @@ -278,3 +277,15 @@ jobs:
- run: cat /etc/issue
- run: cat /etc/os-release
- run: env

# Agregate results from PR.
# https://github.com/EnricoMi/publish-unit-test-result-action/blob/v2.16.1/README.md#support-fork-repositories-and-dependabot-branches
event_file:
name: "Event File"
runs-on: ubuntu-latest
steps:
- name: Upload
uses: actions/upload-artifact@v4
with:
name: Event File
path: ${{ github.event_path }}

0 comments on commit af90783

Please sign in to comment.