Skip to content

Commit

Permalink
chore: set check run based on job name
Browse files Browse the repository at this point in the history
  • Loading branch information
hansjoergventx committed Oct 21, 2023
1 parent 21c1186 commit 53c0154
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/pr-infracost.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ jobs:
- name: Create check run
uses: actions/github-script@v6
env:
job: ${{ github.job }}
number: ${{ github.event.client_payload.pull_request.number }}
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -104,6 +105,7 @@ jobs:
const sha = pull.head.sha;
const { data: check } = await github.rest.checks.create({
...context.repo,
name: process.env.job,
head_sha: sha
});
return check;
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/pr-terraform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ jobs:
- name: Create check run
uses: actions/github-script@v6
env:
job: ${{ github.job }}
number: ${{ github.event.client_payload.pull_request.number }}
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -143,6 +144,7 @@ jobs:
const sha = pull.head.sha;
const { data: check } = await github.rest.checks.create({
...context.repo,
name: process.env.job,
head_sha: sha
});
return check;
Expand Down

0 comments on commit 53c0154

Please sign in to comment.