-
Notifications
You must be signed in to change notification settings - Fork 171
77 lines (68 loc) · 2.45 KB
/
additional.yml
File metadata and controls
77 lines (68 loc) · 2.45 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
68
69
70
71
72
73
74
75
76
77
name: CI Additional
on:
workflow_dispatch: # allows you to trigger manually
schedule:
- cron: "0 0 1 */3 *" # Run every 3 months
permissions: {}
jobs:
min-version-policy:
name: Minimum Version Policy
runs-on: "ubuntu-latest"
permissions:
contents: read
env:
COLUMNS: 120
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # 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"
permissions:
contents: read
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- uses: prefix-dev/setup-pixi@fef5c9568ca6c4ff7707bf840ab0692ba3f08293 # 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@ed597411d8f924073f98dfc5c65a23a2325f34cd # 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']
});