Skip to content

Commit 26b53bc

Browse files
authored
Merge pull request #2266 from webknjaz/maintenance/gha-pre-commit-actionlint
🧪 Integrate actionlint @ pre-commit framework
2 parents 30ed588 + 2a18950 commit 26b53bc

File tree

4 files changed

+26
-11
lines changed

4 files changed

+26
-11
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77
branches:
88
- main
99
tags:
10+
- v*
1011
workflow_call:
1112
inputs:
1213
cpython-pip-version:
@@ -83,11 +84,11 @@ jobs:
8384
|| ''
8485
}}
8586
steps:
86-
- uses: actions/checkout@v3
87+
- uses: actions/checkout@v5
8788
- name: Set up Python ${{ matrix.python-version }} from GitHub
8889
id: python-install
8990
if: "!endsWith(matrix.python-version, '-dev')"
90-
uses: actions/setup-python@v4
91+
uses: actions/setup-python@v6
9192
with:
9293
python-version: ${{ matrix.python-version }}
9394
- name: Set up Python ${{ matrix.python-version }} from deadsnakes
@@ -103,7 +104,7 @@ jobs:
103104
run: |
104105
echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT
105106
- name: Pip cache
106-
uses: actions/cache@v3
107+
uses: actions/cache@v4
107108
with:
108109
path: ${{ steps.pip-cache.outputs.dir }}
109110
key: >-
@@ -158,7 +159,7 @@ jobs:
158159
- name: Upload coverage to Codecov
159160
if: >-
160161
!inputs.cpython-pip-version
161-
uses: codecov/codecov-action@v3
162+
uses: codecov/codecov-action@v5
162163
with:
163164
files: ./coverage.xml
164165
flags: >-
@@ -190,9 +191,9 @@ jobs:
190191
env:
191192
TOXENV: pip${{ matrix.pip-version }}
192193
steps:
193-
- uses: actions/checkout@v3
194+
- uses: actions/checkout@v5
194195
- name: Set up Python ${{ matrix.python-version }}
195-
uses: actions/setup-python@v4
196+
uses: actions/setup-python@v6
196197
with:
197198
python-version: ${{ matrix.python-version }}
198199
- name: Get pip cache dir
@@ -201,7 +202,7 @@ jobs:
201202
run: |
202203
echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT
203204
- name: Pip cache
204-
uses: actions/cache@v3
205+
uses: actions/cache@v4
205206
with:
206207
path: ${{ steps.pip-cache.outputs.dir }}
207208
key: >-

.github/workflows/reusable-qa.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,17 @@ jobs:
2222
TOXENV: ${{ matrix.toxenv }}
2323
TOX_PARALLEL_NO_SPINNER: 1
2424
steps:
25-
- uses: actions/checkout@main
25+
- uses: actions/checkout@v5
2626
- name: Set up Python ${{ matrix.python-version }}
27-
uses: actions/setup-python@v4
27+
uses: actions/setup-python@v6
2828
with:
2929
python-version: ${{ matrix.python-version }}
3030
- name: Get pip cache dir
3131
id: pip-cache
3232
run: |
3333
echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT
3434
- name: Pip cache
35-
uses: actions/cache@v3
35+
uses: actions/cache@v4
3636
with:
3737
path: ${{ steps.pip-cache.outputs.dir }}
3838
key: >-
@@ -45,7 +45,7 @@ jobs:
4545
- name: Prepare cache key
4646
id: cache-key
4747
run: echo "sha-256=$(python -VV | sha256sum | cut -d' ' -f1)" >> $GITHUB_OUTPUT
48-
- uses: actions/cache@v3
48+
- uses: actions/cache@v4
4949
with:
5050
path: ~/.cache/pre-commit
5151
key: pre-commit|${{ steps.cache-key.outputs.sha-256 }}|${{ hashFiles('.pre-commit-config.yaml') }}

.pre-commit-config.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,3 +84,10 @@ repos:
8484
types_or:
8585
- file
8686
- symlink
87+
88+
- repo: https://github.com/rhysd/actionlint.git
89+
rev: v1.7.8
90+
hooks:
91+
- id: actionlint
92+
93+
...

changelog.d/2266.contrib.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
The linting suite now runs [`actionlint`] -- by {user}`webknjaz`.
2+
3+
This tool checks typical problems with GitHub Actions workflow
4+
definitions and has a registry of widely-used GitHub Action
5+
arguments that it validates.
6+
7+
[`actionlint`]: https://rhysd.github.io/actionlint/

0 commit comments

Comments
 (0)