Skip to content
14 changes: 9 additions & 5 deletions .github/workflows/run-rsfc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ on:
is_fork:
required: true
type: boolean
pr_sha:
required: false
type: string
secrets:
RSFC_TOKEN:
required: false
Expand Down Expand Up @@ -82,15 +85,16 @@ jobs:
uses: actions/github-script@v7
with:
script: |
const pr = context.payload.pull_request
const jobId = "${{ steps.get_job.outputs.job_id }}"
const url = `https://github.com/${context.payload.repository.owner.login}/${context.payload.repository.name}/actions/runs/${context.runId}/job/${jobId}`
const headSha = "${{ inputs.pr_sha || github.sha }}"
const owner = context.repo.owner
const repo = context.repo.repo

await github.rest.checks.create({
owner: context.payload.repository.owner.login,
repo: context.payload.repository.name,
owner: owner,
repo: repo,
name: "View report RSFC",
head_sha: pr.head.sha,
head_sha: headSha,
status: "completed",
conclusion: "neutral",
output: {
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/use-rsfc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@ jobs:
with:
repo_url: https://github.com/${{ github.repository }}
is_fork: ${{ github.event.pull_request.head.repo.full_name != github.repository }}
pr_sha: ${{ github.event.pull_request.head.sha }}
secrets:
RSFC_TOKEN: ${{ secrets.RSFC_TOKEN }}
RSFC_TOKEN: ${{ secrets.RSFC_TOKEN }}
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,6 @@ To download it:
2. Select the job **Run RSFC Analysis**
3. Download the artifact from the **Artifacts** section


Example:

```yaml
Expand All @@ -268,5 +267,7 @@ 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 }}
pr_sha: ${{ github.event.pull_request.head.sha }}
secrets:
RSFC_TOKEN: ${{ secrets.RSFC_TOKEN }}