From 2824b5ec6ded35bedc3f57a332fa41108398505e Mon Sep 17 00:00:00 2001 From: Juanje Mendoza Date: Mon, 16 Feb 2026 15:47:52 +0100 Subject: [PATCH 1/3] caller action to run rscf analysis --- .github/workflows/use-rsfc.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 .github/workflows/use-rsfc.yml diff --git a/.github/workflows/use-rsfc.yml b/.github/workflows/use-rsfc.yml new file mode 100644 index 0000000..3b7137d --- /dev/null +++ b/.github/workflows/use-rsfc.yml @@ -0,0 +1,14 @@ +name: Run RSFC analysis + +on: + workflow_dispatch: + pull_request: + types: [opened, synchronize, reopened] + +jobs: + run-rsfc-checks: + uses: oeg-upm/rsfc/.github/workflows/run-rsfc.yml@main + with: + repo_url: https://github.com/${{ github.repository }} + secrets: + RSFC_TOKEN: ${{ secrets.RSFC_TOKEN }} \ No newline at end of file From d6cc64a99735989f93d6ed4a6e1a9d1324135ee3 Mon Sep 17 00:00:00 2001 From: Juanje Mendoza Date: Mon, 16 Feb 2026 16:05:46 +0100 Subject: [PATCH 2/3] Avoid creating neutral check on PR from forks because GitHub restricts check-run creation --- .github/workflows/run-rsfc.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/run-rsfc.yml b/.github/workflows/run-rsfc.yml index 7a52cf1..313c1de 100644 --- a/.github/workflows/run-rsfc.yml +++ b/.github/workflows/run-rsfc.yml @@ -74,7 +74,12 @@ jobs: const job = jobs.data.jobs[jobs.data.jobs.length - 1] core.setOutput("job_id", job.id) - name: Create neutral check - if: ${{ github.event_name == 'pull_request' }} + # if: ${{ github.event_name == 'pull_request' }} + if: > + ${{ + github.event_name == 'pull_request' && + github.event.pull_request.head.repo.full_name == github.repository + }} uses: actions/github-script@v7 with: script: | From 8e03986c97ea34cd11da51cfa5be53f5ba525dab Mon Sep 17 00:00:00 2001 From: Juanje Mendoza Date: Mon, 16 Feb 2026 16:16:56 +0100 Subject: [PATCH 3/3] input is fork. Action run rsfc caller and run --- .github/workflows/run-rsfc.yml | 9 ++++----- .github/workflows/use-rsfc.yml | 1 + 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/run-rsfc.yml b/.github/workflows/run-rsfc.yml index 313c1de..a63cb68 100644 --- a/.github/workflows/run-rsfc.yml +++ b/.github/workflows/run-rsfc.yml @@ -6,6 +6,9 @@ on: description: 'Repository URL to analyze' required: true type: string + is_fork: + required: true + type: boolean secrets: RSFC_TOKEN: required: false @@ -75,11 +78,7 @@ jobs: core.setOutput("job_id", job.id) - name: Create neutral check # if: ${{ github.event_name == 'pull_request' }} - if: > - ${{ - github.event_name == 'pull_request' && - github.event.pull_request.head.repo.full_name == github.repository - }} + if: ${{ !inputs.is_fork }} uses: actions/github-script@v7 with: script: | diff --git a/.github/workflows/use-rsfc.yml b/.github/workflows/use-rsfc.yml index 3b7137d..2906214 100644 --- a/.github/workflows/use-rsfc.yml +++ b/.github/workflows/use-rsfc.yml @@ -10,5 +10,6 @@ jobs: uses: oeg-upm/rsfc/.github/workflows/run-rsfc.yml@main with: repo_url: https://github.com/${{ github.repository }} + is_fork: ${{ github.event.pull_request.head.repo.full_name != github.repository }} secrets: RSFC_TOKEN: ${{ secrets.RSFC_TOKEN }} \ No newline at end of file