File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3030 - uses : actions/checkout@v5
3131 - uses : prefix-dev/setup-pixi@v0.9.0
3232 - run : pixi run docs-linkcheck
33+
34+ create-issue-on-failure :
35+ name : Create issue on failure
36+ runs-on : ubuntu-latest
37+ needs : [min-version-policy, linkcheck]
38+ if : |
39+ always() &&
40+ (needs.min-version-policy.result == 'failure' || needs.linkcheck.result == 'failure') &&
41+ github.event_name == 'schedule'
42+ permissions :
43+ issues : write
44+ steps :
45+ - name : Create issue
46+ uses : actions/github-script@v7
47+ with :
48+ script : |
49+ const workflowUrl = `${context.serverUrl}/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}`;
50+ const title = `CI Additional workflow failed - ${new Date().toISOString().split('T')[0]}`;
51+ const body = `The [CI Additional workflow](${workflowUrl}) failed on its scheduled run.
52+
53+ **Workflow Run:** ${context.runId}
54+ **Trigger:** ${context.eventName}
55+ **Branch:** ${context.ref}
56+
57+ Please investigate the failure and fix the issues.
58+
59+ _This issue was automatically created by the workflow._`;
60+
61+ await github.rest.issues.create({
62+ owner: context.repo.owner,
63+ repo: context.repo.repo,
64+ title: title,
65+ body: body,
66+ labels: ['bug', 'automated']
67+ });
You can’t perform that action at this time.
0 commit comments