Skip to content

Commit e4eed27

Browse files
committed
CI: use ubuntu20.04 -> ubuntu-latest
1 parent 1c80127 commit e4eed27

2 files changed

Lines changed: 65 additions & 65 deletions

File tree

.github/workflows/docs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010
jobs:
1111
build:
1212
name: Build
13-
runs-on: ubuntu-20.04
13+
runs-on: ubuntu-latest
1414
continue-on-error: false
1515

1616
defaults:
@@ -100,7 +100,7 @@ jobs:
100100

101101
deploy:
102102
name: Deploy
103-
runs-on: ubuntu-20.04
103+
runs-on: ubuntu-latest
104104
needs: build
105105
if: ${{ github.repository_owner == 'klauer' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags')) }}
106106

.github/workflows/pre-commit.yml

Lines changed: 63 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -8,74 +8,74 @@ on:
88

99
jobs:
1010
pre-commit:
11-
runs-on: ubuntu-20.04
11+
runs-on: ubuntu-latest
1212

1313
steps:
14-
- uses: actions/checkout@v4
14+
- uses: actions/checkout@v4
1515

16-
- name: Configure the matcher to annotate the diff
17-
run: |
18-
# Ref: https://github.com/actions/toolkit/blob/main/docs/problem-matchers.md
19-
cat > "$HOME/flake8_problem_matcher.json" <<'EOF'
20-
{
21-
"problemMatcher": [
22-
{
23-
"owner": "flake8_error",
24-
"severity": "error",
25-
"pattern": [
26-
{
27-
"regexp": "^(.+):(\\d+):(\\d+): (E\\d+) (.+)$",
28-
"file": 1,
29-
"line": 2,
30-
"column": 3,
31-
"code": 4,
32-
"message": 5
33-
}
34-
]
35-
},
36-
{
37-
"owner": "flake8_warning",
38-
"severity": "warning",
39-
"pattern": [
40-
{
41-
"regexp": "^(.+):(\\d+):(\\d+): (W\\d+) (.+)$",
42-
"file": 1,
43-
"line": 2,
44-
"column": 3,
45-
"code": 4,
46-
"message": 5
47-
}
48-
]
49-
}
50-
]
51-
}
52-
EOF
53-
echo "::add-matcher::$HOME/flake8_problem_matcher.json"
16+
- name: Configure the matcher to annotate the diff
17+
run: |
18+
# Ref: https://github.com/actions/toolkit/blob/main/docs/problem-matchers.md
19+
cat > "$HOME/flake8_problem_matcher.json" <<'EOF'
20+
{
21+
"problemMatcher": [
22+
{
23+
"owner": "flake8_error",
24+
"severity": "error",
25+
"pattern": [
26+
{
27+
"regexp": "^(.+):(\\d+):(\\d+): (E\\d+) (.+)$",
28+
"file": 1,
29+
"line": 2,
30+
"column": 3,
31+
"code": 4,
32+
"message": 5
33+
}
34+
]
35+
},
36+
{
37+
"owner": "flake8_warning",
38+
"severity": "warning",
39+
"pattern": [
40+
{
41+
"regexp": "^(.+):(\\d+):(\\d+): (W\\d+) (.+)$",
42+
"file": 1,
43+
"line": 2,
44+
"column": 3,
45+
"code": 4,
46+
"message": 5
47+
}
48+
]
49+
}
50+
]
51+
}
52+
EOF
53+
echo "::add-matcher::$HOME/flake8_problem_matcher.json"
5454
55-
- name: Install pre-commit
56-
run: |
57-
python -m pip install pre-commit
55+
- name: Install pre-commit
56+
run: |
57+
python -m pip install pre-commit
5858
59-
- name: List Python package versions
60-
run: |
61-
python -m pip freeze --local
59+
- name: List Python package versions
60+
run: |
61+
python -m pip freeze --local
6262
63-
- name: Check for pre-commit configuration
64-
run: |
65-
if [ ! -f ".pre-commit-config.yaml" ]; then
66-
echo "::error::No pre-commit configuration found!"
67-
exit 1
68-
fi
63+
- name: Check for pre-commit configuration
64+
run: |
65+
if [ ! -f ".pre-commit-config.yaml" ]; then
66+
echo "::error::No pre-commit configuration found!"
67+
exit 1
68+
fi
6969
70-
- name: Switch to temporary branch
71-
run: |
72-
# This is to avoid no-commit-to-branch from failing us when this is run
73-
# on master.
74-
git checkout -b _pre_commit_check_branch
70+
- name: Switch to temporary branch
71+
run: |
72+
# This is to avoid no-commit-to-branch from failing us when this is run
73+
# on master.
74+
git checkout -b _pre_commit_check_branch
7575
76-
- name: Check pre-commit usage
77-
run: |
78-
pre-commit run \
79-
--show-diff-on-failure \
80-
--color=always \
81-
--all-files
76+
- name: Check pre-commit usage
77+
run: |
78+
pre-commit run \
79+
--show-diff-on-failure \
80+
--color=always \
81+
--all-files

0 commit comments

Comments
 (0)