-
Notifications
You must be signed in to change notification settings - Fork 171
67 lines (59 loc) · 2.04 KB
/
additional.yml
File metadata and controls
67 lines (59 loc) · 2.04 KB
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: CI Additional
on:
workflow_dispatch: # allows you to trigger manually
schedule:
- cron: "0 0 1 */3 *" # Run every 3 months
jobs:
min-version-policy:
name: Minimum Version Policy
runs-on: "ubuntu-latest"
env:
COLUMNS: 120
steps:
- uses: actions/checkout@v5
- uses: astral-sh/setup-uv@v7
with:
version: "0.9.26"
- run: |
uvx --from xarray-minimum-dependency-policy==2.0.0 \
minimum-versions validate \
--policy=.github/ci/policy.yaml \
--manifest-path=./pixi.toml \
pixi:test-minimum
linkcheck:
name: pixi run docs-linkcheck
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v5
- uses: prefix-dev/setup-pixi@v0.9.0
- run: pixi run docs-linkcheck
create-issue-on-failure:
name: Create issue on failure
runs-on: ubuntu-latest
needs: [min-version-policy, linkcheck]
if: |
always() &&
(needs.min-version-policy.result == 'failure' || needs.linkcheck.result == 'failure') &&
github.event_name == 'schedule'
permissions:
issues: write
steps:
- name: Create issue
uses: actions/github-script@v8
with:
script: |
const workflowUrl = `${context.serverUrl}/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}`;
const title = `CI Additional workflow failed - ${new Date().toISOString().split('T')[0]}`;
const body = `The [CI Additional workflow](${workflowUrl}) failed on its scheduled run.
**Workflow Run:** ${context.runId}
**Trigger:** ${context.eventName}
**Branch:** ${context.ref}
Please investigate the failure and fix the issues.
_This issue was automatically created by the workflow._`;
await github.rest.issues.create({
owner: context.repo.owner,
repo: context.repo.repo,
title: title,
body: body,
labels: ['bug', 'automated']
});