-
Notifications
You must be signed in to change notification settings - Fork 945
/
action.yaml
29 lines (29 loc) · 1003 Bytes
/
action.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
name: CommitStatusStart
description: 'Adds a commit status at the start of the test run to set the status to pending'
inputs:
name:
description: "Name of the check"
required: true
git_ref:
description: "The git commit, tag, or branch to check out. Requires a corresponding Karpenter snapshot release"
required: true
runs:
using: "composite"
steps:
- uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
if: always()
env:
NAME: ${{ inputs.name }}
SHA: ${{ inputs.git_ref }}
REPO: ${{ github.repository }}
RUN_ID: ${{ github.run_id }}
with:
script: |
github.rest.repos.createCommitStatus({
owner: context.repo.owner,
repo: context.repo.repo,
context: process.env.NAME,
sha: process.env.SHA,
state: "pending",
target_url: `https://github.com/${process.env.REPO}/actions/runs/${process.env.RUN_ID}`,
});