https://github.com/lowrisc/post-job-status-action
Post job status to another repository
https://github.com/lowrisc/post-job-status-action
Last synced: about 1 year ago
JSON representation
Post job status to another repository
- Host: GitHub
- URL: https://github.com/lowrisc/post-job-status-action
- Owner: lowRISC
- License: apache-2.0
- Created: 2023-12-20T13:40:38.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-03-27T17:48:04.000Z (over 2 years ago)
- Last Synced: 2024-04-13T15:18:29.052Z (about 2 years ago)
- Language: TypeScript
- Size: 1.03 MB
- Stars: 0
- Watchers: 9
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Post Job Status
===
This project has been developed to meet lowRISC's internal need and is *not supported* by lowRISC.
This is a GitHub action to post job status to another repository.
This can be useful if you needs to post status in a workflow_dispatch or pull_request_target.
## Parameters
| Name | Description |
| --- | --- |
| repository | The repository to post the status to. |
| sha | The commit sha to post the status to. |
| workflow_name | Name of the workflow. This shows up in the status check posted. It does not have to match the workflow that invokes this action. This defaults to the name of the running workflow. |
| job_name | The name of the job. This shows up in the status check posted, and it also needs to match the job that invokes this action. |
| step_name | The name of the step. This needs to match the step name that uses this action. It would not show up in the posted status check. |
| token | GitHub token that authenticates the running action. This defaults to `${{ github.token }}` and do not have to be explicitly set. |
| pat | GitHub personal access token that authenticates the status posting. This needs to have the `statuses:write` scope for the target repository. |
## Examples
```yaml
name: CI
on:
pull_request_target:
permissions:
statuses: write
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Post job status
uses: lowRISC/post-job-status-action@v1
with:
repository: ${{ github.repository }}
sha: ${{ github.event.pull_request.head.sha }}
job_name: Build
step_name: Post job status
pat: ${{ github.token }}
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Do Build
run: ...
```