Skip to content

Commit

Permalink
User newer version of octokit for retest GHA
Browse files Browse the repository at this point in the history
Thank you ChatGPT for helping me out

Signed-off-by: Arko Dasgupta <arko@tetrate.io>
  • Loading branch information
arkodg committed May 31, 2023
1 parent 903e481 commit ff344c6
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/retest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,20 @@ jobs:
console.log(`Comment: ${comment}`);
console.log(`Contains Trigger: ${containsTrigger}`);
return containsTrigger;
- name: Rerun Action
if: steps.check_comment.outputs.result == 'true'
uses: actions/github-script@v5
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
run: |
npm install @octokit/core@^3
const { Octokit } = require("@octokit/core");
const octokit = new Octokit({ auth: process.env.GITHUB_TOKEN });
const { owner, repo } = context.repo;
const workflowId = 'build_and_test.yaml';
const { number } = context.issue;
const octokit = github.getOctokit(process.env.GITHUB_TOKEN);
await octokit.actions.createWorkflowDispatch({
await octokit.request('POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches', {
owner,
repo,
workflow_id: workflowId,
Expand Down

0 comments on commit ff344c6

Please sign in to comment.