Skip to content

Commit ef0ee06

Browse files
authored
chore: format github workflows (#979)
1 parent 5a22b04 commit ef0ee06

File tree

10 files changed

+122
-76
lines changed

10 files changed

+122
-76
lines changed

.github/workflows/ci.yml

+8-5
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ on:
66
branches:
77
- main
88

9+
permissions:
10+
contents: read
11+
912
concurrency:
1013
cancel-in-progress: true
1114
group: ${{ github.workflow }}-${{ github.ref }}
@@ -42,11 +45,11 @@ jobs:
4245
# renovate: github-runner
4346
- windows-2025
4447
python-version:
45-
- '3.9'
46-
- '3.10'
47-
- '3.11'
48-
- '3.12'
49-
- '3.13'
48+
- "3.9"
49+
- "3.10"
50+
- "3.11"
51+
- "3.12"
52+
- "3.13"
5053
consistency:
5154
if: ${{ !cancelled() && ! failure() }}
5255
runs-on: ubuntu-24.04

.github/workflows/commitlint.yml

+16-10
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,23 @@
11
name: CommitLint
2+
3+
on:
4+
pull_request:
5+
types:
6+
- opened
7+
- synchronize
8+
- reopened
9+
- edited
10+
push:
11+
branches:
12+
- main
13+
14+
permissions:
15+
contents: read
16+
217
concurrency:
318
cancel-in-progress: true
419
group: ${{ github.workflow }}-${{ github.ref }}
20+
521
jobs:
622
commitlint:
723
container:
@@ -15,13 +31,3 @@ jobs:
1531
- name: Validate pull request title with commitlint
1632
if: github.event_name == 'pull_request'
1733
run: echo "${{ github.event.pull_request.title }}" | npx commitlint -x @commitlint/config-conventional
18-
on:
19-
pull_request:
20-
types:
21-
- opened
22-
- synchronize
23-
- reopened
24-
- edited
25-
push:
26-
branches:
27-
- main
+15-11
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,5 @@
11
name: Read the Docs Pull Request Preview
2-
concurrency:
3-
cancel-in-progress: true
4-
group: ${{ github.workflow }}-${{ github.ref }}
5-
jobs:
6-
documentation-links:
7-
runs-on: ubuntu-24.04
8-
steps:
9-
- name: Add Read the Docs preview's link to pull request
10-
uses: readthedocs/actions/preview@b8bba1484329bda1a3abe986df7ebc80a8950333 # v1.5
11-
with:
12-
project-slug: ss-python
2+
133
on:
144
pull_request_target:
155
types:
@@ -22,5 +12,19 @@ on:
2212
- docs/**
2313
- pdm.dev.lock
2414
- pdm.lock
15+
2516
permissions:
2617
pull-requests: write
18+
19+
concurrency:
20+
cancel-in-progress: true
21+
group: ${{ github.workflow }}-${{ github.ref }}
22+
23+
jobs:
24+
documentation-links:
25+
runs-on: ubuntu-24.04
26+
steps:
27+
- name: Add Read the Docs preview's link to pull request
28+
uses: readthedocs/actions/preview@b8bba1484329bda1a3abe986df7ebc80a8950333 # v1.5
29+
with:
30+
project-slug: ss-python

.github/workflows/release.yml

+10-7
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ on:
55
types:
66
- published
77

8+
permissions:
9+
contents: read
10+
811
concurrency:
912
cancel-in-progress: true
1013
group: ${{ github.workflow }}-${{ github.ref }}
@@ -21,7 +24,7 @@ jobs:
2124
uses: pdm-project/setup-pdm@deb8d8a4e2a03aabcef6f2cc981923fc6b29ef99 # v4.3
2225
with:
2326
cache: true
24-
python-version: '3.12'
27+
python-version: "3.12"
2528
version: 2.24.1
2629
cache-dependency-path: |
2730
./pdm.dev.lock
@@ -111,11 +114,11 @@ jobs:
111114
strategy:
112115
matrix:
113116
python-version:
114-
- '3.9'
115-
- '3.10'
116-
- '3.11'
117-
- '3.12'
118-
- '3.13'
117+
- "3.9"
118+
- "3.10"
119+
- "3.11"
120+
- "3.12"
121+
- "3.13"
119122
package-publish:
120123
runs-on: ubuntu-24.04
121124
permissions:
@@ -128,7 +131,7 @@ jobs:
128131
uses: pdm-project/setup-pdm@deb8d8a4e2a03aabcef6f2cc981923fc6b29ef99 # v4.3
129132
with:
130133
cache: true
131-
python-version: '3.12'
134+
python-version: "3.12"
132135
version: 2.24.1
133136
cache-dependency-path: |
134137
./pdm.dev.lock

.github/workflows/renovate.yml

+12-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,16 @@
11
name: Renovate
2+
3+
on:
4+
schedule:
5+
# * is a special character in YAML so you have to quote this string
6+
- cron: "*/15 0-3 * * 1"
7+
workflow_dispatch: null
8+
9+
permissions:
10+
contents: read
11+
issues: write
12+
pull-requests: write
13+
214
jobs:
315
renovate:
416
container:
@@ -46,8 +58,3 @@ jobs:
4658
else
4759
renovate $RENOVATE_EXTRA_FLAG
4860
fi
49-
on:
50-
schedule:
51-
# * is a special character in YAML so you have to quote this string
52-
- cron: "*/15 0-3 * * 1"
53-
workflow_dispatch: null

template/{% if repo_platform == 'github' %}.github{% endif %}/workflows/ci.yml.jinja

+8-5
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ on:
77
branches:
88
- main
99

10+
permissions:
11+
contents: read
12+
1013
concurrency:
1114
cancel-in-progress: true
1215
group: {{ '${{ github.workflow }}-${{ github.ref }}' }}
@@ -50,19 +53,19 @@ jobs:
5053
{% endif %}
5154
python-version:
5255
{% if version_between("3.9", min_py, max_py) %}
53-
- '3.9'
56+
- "3.9"
5457
{% endif %}
5558
{% if version_between("3.10", min_py, max_py) %}
56-
- '3.10'
59+
- "3.10"
5760
{% endif %}
5861
{% if version_between("3.11", min_py, max_py) %}
59-
- '3.11'
62+
- "3.11"
6063
{% endif %}
6164
{% if version_between("3.12", min_py, max_py) %}
62-
- '3.12'
65+
- "3.12"
6366
{% endif %}
6467
{% if version_between("3.13", min_py, max_py) %}
65-
- '3.13'
68+
- "3.13"
6669
{% endif %}
6770
{% if project_name == "Serious Scaffold Python" %}
6871
consistency:

template/{% if repo_platform == 'github' %}.github{% endif %}/workflows/commitlint.yml

+16-10
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,23 @@
11
name: CommitLint
2+
3+
on:
4+
pull_request:
5+
types:
6+
- opened
7+
- synchronize
8+
- reopened
9+
- edited
10+
push:
11+
branches:
12+
- main
13+
14+
permissions:
15+
contents: read
16+
217
concurrency:
318
cancel-in-progress: true
419
group: ${{ github.workflow }}-${{ github.ref }}
20+
521
jobs:
622
commitlint:
723
container:
@@ -15,13 +31,3 @@ jobs:
1531
- name: Validate pull request title with commitlint
1632
if: github.event_name == 'pull_request'
1733
run: echo "${{ github.event.pull_request.title }}" | npx commitlint -x @commitlint/config-conventional
18-
on:
19-
pull_request:
20-
types:
21-
- opened
22-
- synchronize
23-
- reopened
24-
- edited
25-
push:
26-
branches:
27-
- main
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,5 @@
11
name: Read the Docs Pull Request Preview
2-
concurrency:
3-
cancel-in-progress: true
4-
group: {{ '${{ github.workflow }}-${{ github.ref }}' }}
5-
jobs:
6-
documentation-links:
7-
runs-on: ubuntu-24.04
8-
steps:
9-
- name: Add Read the Docs preview's link to pull request
10-
uses: readthedocs/actions/preview@b8bba1484329bda1a3abe986df7ebc80a8950333 # v1.5
11-
with:
12-
project-slug: {{ repo_name }}
2+
133
on:
144
pull_request_target:
155
types:
@@ -22,5 +12,19 @@ on:
2212
- docs/**
2313
- pdm.dev.lock
2414
- pdm.lock
15+
2516
permissions:
2617
pull-requests: write
18+
19+
concurrency:
20+
cancel-in-progress: true
21+
group: {{ '${{ github.workflow }}-${{ github.ref }}' }}
22+
23+
jobs:
24+
documentation-links:
25+
runs-on: ubuntu-24.04
26+
steps:
27+
- name: Add Read the Docs preview's link to pull request
28+
uses: readthedocs/actions/preview@b8bba1484329bda1a3abe986df7ebc80a8950333 # v1.5
29+
with:
30+
project-slug: {{ repo_name }}

template/{% if repo_platform == 'github' %}.github{% endif %}/workflows/release.yml.jinja

+10-7
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ on:
66
types:
77
- published
88

9+
permissions:
10+
contents: read
11+
912
concurrency:
1013
cancel-in-progress: true
1114
group: {{ '${{ github.workflow }}-${{ github.ref }}' }}
@@ -22,7 +25,7 @@ jobs:
2225
uses: pdm-project/setup-pdm@deb8d8a4e2a03aabcef6f2cc981923fc6b29ef99 # v4.3
2326
with:
2427
cache: true
25-
python-version: '{{ default_py }}'
28+
python-version: "{{ default_py }}"
2629
version: 2.24.1
2730
cache-dependency-path: |
2831
./pdm.dev.lock
@@ -113,19 +116,19 @@ jobs:
113116
matrix:
114117
python-version:
115118
{% if version_between("3.9", min_py, max_py) %}
116-
- '3.9'
119+
- "3.9"
117120
{% endif %}
118121
{% if version_between("3.10", min_py, max_py) %}
119-
- '3.10'
122+
- "3.10"
120123
{% endif %}
121124
{% if version_between("3.11", min_py, max_py) %}
122-
- '3.11'
125+
- "3.11"
123126
{% endif %}
124127
{% if version_between("3.12", min_py, max_py) %}
125-
- '3.12'
128+
- "3.12"
126129
{% endif %}
127130
{% if version_between("3.13", min_py, max_py) %}
128-
- '3.13'
131+
- "3.13"
129132
{% endif %}
130133
package-publish:
131134
runs-on: ubuntu-24.04
@@ -139,7 +142,7 @@ jobs:
139142
uses: pdm-project/setup-pdm@deb8d8a4e2a03aabcef6f2cc981923fc6b29ef99 # v4.3
140143
with:
141144
cache: true
142-
python-version: '{{ default_py }}'
145+
python-version: "{{ default_py }}"
143146
version: 2.24.1
144147
cache-dependency-path: |
145148
./pdm.dev.lock

template/{% if repo_platform == 'github' %}.github{% endif %}/workflows/renovate.yml.jinja

+12-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,16 @@
11
name: Renovate
2+
3+
on:
4+
schedule:
5+
# * is a special character in YAML so you have to quote this string
6+
- cron: "*/15 0-3 * * 1"
7+
workflow_dispatch: null
8+
9+
permissions:
10+
contents: read
11+
issues: write
12+
pull-requests: write
13+
214
jobs:
315
renovate:
416
container:
@@ -50,8 +62,3 @@ jobs:
5062
else
5163
renovate $RENOVATE_EXTRA_FLAG
5264
fi
53-
on:
54-
schedule:
55-
# * is a special character in YAML so you have to quote this string
56-
- cron: "*/15 0-3 * * 1"
57-
workflow_dispatch: null

0 commit comments

Comments
 (0)