@@ -1,7 +1,6 @@
|
||||
name: Examples - APO
|
||||
permissions:
|
||||
contents: read
|
||||
issues: write
|
||||
on:
|
||||
schedule:
|
||||
# Every day at 3 AM UTC+8
|
||||
@@ -13,18 +12,6 @@ on:
|
||||
types: [ci-apo, ci-all]
|
||||
|
||||
jobs:
|
||||
dispatch-notify:
|
||||
if: github.event_name == 'repository_dispatch'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Comment with workflow run link
|
||||
uses: actions/github-script@v8
|
||||
with:
|
||||
script: |
|
||||
const dispatchComment = require('./scripts/dispatch_comment.js');
|
||||
await dispatchComment({ core, github, context });
|
||||
|
||||
apo:
|
||||
if: >
|
||||
github.event_name != 'repository_dispatch' ||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
name: Examples - Calc-X
|
||||
permissions:
|
||||
contents: read
|
||||
issues: write
|
||||
on:
|
||||
schedule:
|
||||
# Every day at 3 AM UTC+8
|
||||
@@ -13,18 +12,6 @@ on:
|
||||
types: [ci-calc-x, ci-all]
|
||||
|
||||
jobs:
|
||||
dispatch-notify:
|
||||
if: github.event_name == 'repository_dispatch'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Comment with workflow run link
|
||||
uses: actions/github-script@v8
|
||||
with:
|
||||
script: |
|
||||
const dispatchComment = require('./scripts/dispatch_comment.js');
|
||||
await dispatchComment({ core, github, context });
|
||||
|
||||
calc-x:
|
||||
if: >
|
||||
github.event_name != 'repository_dispatch' ||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
name: Examples - Backward Compatibility
|
||||
permissions:
|
||||
contents: read
|
||||
issues: write
|
||||
on:
|
||||
schedule:
|
||||
# Every day at 6 AM UTC+8
|
||||
@@ -13,18 +12,6 @@ on:
|
||||
types: [ci-compat, ci-all]
|
||||
|
||||
jobs:
|
||||
dispatch-notify:
|
||||
if: github.event_name == 'repository_dispatch'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Comment with workflow run link
|
||||
uses: actions/github-script@v8
|
||||
with:
|
||||
script: |
|
||||
const dispatchComment = require('./scripts/dispatch_comment.js');
|
||||
await dispatchComment({ core, github, context });
|
||||
|
||||
backward-compatibility:
|
||||
if: >
|
||||
github.event_name != 'repository_dispatch' ||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
name: Examples - Spider
|
||||
permissions:
|
||||
contents: read
|
||||
issues: write
|
||||
on:
|
||||
schedule:
|
||||
# Every day at 4 AM UTC+8
|
||||
@@ -13,18 +12,6 @@ on:
|
||||
types: [ci-spider, ci-all]
|
||||
|
||||
jobs:
|
||||
dispatch-notify:
|
||||
if: github.event_name == 'repository_dispatch'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Comment with workflow run link
|
||||
uses: actions/github-script@v8
|
||||
with:
|
||||
script: |
|
||||
const dispatchComment = require('./scripts/dispatch_comment.js');
|
||||
await dispatchComment({ core, github, context });
|
||||
|
||||
spider:
|
||||
if: >
|
||||
github.event_name != 'repository_dispatch' ||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
name: Examples - Unsloth
|
||||
permissions:
|
||||
contents: read
|
||||
issues: write
|
||||
on:
|
||||
schedule:
|
||||
# Every day at 5 AM UTC+8
|
||||
@@ -13,18 +12,6 @@ on:
|
||||
types: [ci-unsloth, ci-all]
|
||||
|
||||
jobs:
|
||||
dispatch-notify:
|
||||
if: github.event_name == 'repository_dispatch'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Comment with workflow run link
|
||||
uses: actions/github-script@v8
|
||||
with:
|
||||
script: |
|
||||
const dispatchComment = require('./scripts/dispatch_comment.js');
|
||||
await dispatchComment({ core, github, context });
|
||||
|
||||
unsloth:
|
||||
if: >
|
||||
github.event_name != 'repository_dispatch' ||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
name: GPU Test
|
||||
permissions:
|
||||
contents: read
|
||||
issues: write
|
||||
on:
|
||||
schedule:
|
||||
# Every day at 5 AM UTC+8
|
||||
@@ -13,18 +12,6 @@ on:
|
||||
types: [ci-unsloth, ci-all]
|
||||
|
||||
jobs:
|
||||
dispatch-notify:
|
||||
if: github.event_name == 'repository_dispatch'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Comment with workflow run link
|
||||
uses: actions/github-script@v8
|
||||
with:
|
||||
script: |
|
||||
const dispatchComment = require('./scripts/dispatch_comment.js');
|
||||
await dispatchComment({ core, github, context });
|
||||
|
||||
tests-full:
|
||||
if: >
|
||||
github.event_name != 'repository_dispatch' ||
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
// Copyright (c) Microsoft. All rights reserved.
|
||||
|
||||
module.exports = async function dispatchComment({ core, github, context }) {
|
||||
const payload = context.payload.client_payload || {};
|
||||
const pullNumber = payload.pull_number;
|
||||
|
||||
if (!pullNumber) {
|
||||
core.notice(
|
||||
"No pull_number found in repository_dispatch payload; skipping comment."
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
const { owner, repo } = context.repo;
|
||||
const action =
|
||||
context.payload.action || payload.ci_label || context.eventName || "dispatch";
|
||||
const runId = process.env.GITHUB_RUN_ID;
|
||||
const workflowName = context.workflow || "Workflow";
|
||||
const runUrl = `https://github.com/${owner}/${repo}/actions/runs/${runId}`;
|
||||
|
||||
const body = `🚀 ${workflowName} dispatched via \`${action}\`. Track progress here: ${runUrl}`;
|
||||
|
||||
await github.rest.issues.createComment({
|
||||
owner,
|
||||
repo,
|
||||
issue_number: pullNumber,
|
||||
body,
|
||||
});
|
||||
};
|
||||
Reference in New Issue
Block a user