Skip to content

Commit 53d2b1e

Browse files
blacksmith.sh: Migrate workflows to Blacksmith (#403)
* Migrate workflows to Blacksmith * Removed "if: startsWith(matrix.os, ubuntu-)" --------- Co-authored-by: blacksmith-sh[bot] <157653362+blacksmith-sh[bot]@users.noreply.github.com> Co-authored-by: Tomer Nosrati <[email protected]>
1 parent abf01f0 commit 53d2b1e

8 files changed

+33
-52
lines changed

.github/workflows/codeql-analysis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ on:
2121
jobs:
2222
analyze:
2323
name: Analyze
24-
runs-on: ubuntu-latest
24+
runs-on: blacksmith-4vcpu-ubuntu-2204
2525
permissions:
2626
actions: read
2727
contents: read

.github/workflows/deploy.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66

77
jobs:
88
deploy:
9-
runs-on: ubuntu-latest
9+
runs-on: blacksmith-4vcpu-ubuntu-2204
1010
env:
1111
POETRY_VIRTUALENVS_CREATE: "false"
1212
steps:

.github/workflows/docker.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ on:
2727

2828
jobs:
2929
build-worker:
30-
runs-on: ubuntu-latest
30+
runs-on: blacksmith-4vcpu-ubuntu-2204
3131
timeout-minutes: 5
3232
steps:
3333
- uses: actions/checkout@v4

.github/workflows/examples.yml

+18-27
Original file line numberDiff line numberDiff line change
@@ -37,16 +37,15 @@ jobs:
3737
fail-fast: false
3838
matrix:
3939
python-version: ["3.12"]
40-
os: ["ubuntu-latest"]
40+
os: ["blacksmith-4vcpu-ubuntu-2204"]
4141

4242
steps:
4343
- name: Install apt packages
44-
if: startsWith(matrix.os, 'ubuntu-')
4544
run: |
4645
sudo apt update
4746
- uses: actions/checkout@v4
4847
- name: Set up Python ${{ matrix.python-version }}
49-
uses: actions/setup-python@v5
48+
uses: useblacksmith/setup-python@v6
5049
with:
5150
python-version: ${{ matrix.python-version }}
5251
cache: 'pip'
@@ -70,16 +69,15 @@ jobs:
7069
fail-fast: false
7170
matrix:
7271
python-version: ["3.12"]
73-
os: ["ubuntu-latest"]
72+
os: ["blacksmith-4vcpu-ubuntu-2204"]
7473

7574
steps:
7675
- name: Install apt packages
77-
if: startsWith(matrix.os, 'ubuntu-')
7876
run: |
7977
sudo apt update
8078
- uses: actions/checkout@v4
8179
- name: Set up Python ${{ matrix.python-version }}
82-
uses: actions/setup-python@v5
80+
uses: useblacksmith/setup-python@v6
8381
with:
8482
python-version: ${{ matrix.python-version }}
8583
cache: 'pip'
@@ -103,16 +101,15 @@ jobs:
103101
fail-fast: false
104102
matrix:
105103
python-version: ["3.12"]
106-
os: ["ubuntu-latest"]
104+
os: ["blacksmith-4vcpu-ubuntu-2204"]
107105

108106
steps:
109107
- name: Install apt packages
110-
if: startsWith(matrix.os, 'ubuntu-')
111108
run: |
112109
sudo apt update
113110
- uses: actions/checkout@v4
114111
- name: Set up Python ${{ matrix.python-version }}
115-
uses: actions/setup-python@v5
112+
uses: useblacksmith/setup-python@v6
116113
with:
117114
python-version: ${{ matrix.python-version }}
118115
cache: 'pip'
@@ -136,16 +133,15 @@ jobs:
136133
fail-fast: false
137134
matrix:
138135
python-version: ["3.12"]
139-
os: ["ubuntu-latest"]
136+
os: ["blacksmith-4vcpu-ubuntu-2204"]
140137

141138
steps:
142139
- name: Install apt packages
143-
if: startsWith(matrix.os, 'ubuntu-')
144140
run: |
145141
sudo apt update
146142
- uses: actions/checkout@v4
147143
- name: Set up Python ${{ matrix.python-version }}
148-
uses: actions/setup-python@v5
144+
uses: useblacksmith/setup-python@v6
149145
with:
150146
python-version: ${{ matrix.python-version }}
151147
cache: 'pip'
@@ -169,16 +165,15 @@ jobs:
169165
fail-fast: false
170166
matrix:
171167
python-version: ["3.12"]
172-
os: ["ubuntu-latest"]
168+
os: ["blacksmith-4vcpu-ubuntu-2204"]
173169

174170
steps:
175171
- name: Install apt packages
176-
if: startsWith(matrix.os, 'ubuntu-')
177172
run: |
178173
sudo apt update
179174
- uses: actions/checkout@v4
180175
- name: Set up Python ${{ matrix.python-version }}
181-
uses: actions/setup-python@v5
176+
uses: useblacksmith/setup-python@v6
182177
with:
183178
python-version: ${{ matrix.python-version }}
184179
cache: 'pip'
@@ -208,16 +203,15 @@ jobs:
208203
fail-fast: false
209204
matrix:
210205
python-version: ["3.12"]
211-
os: ["ubuntu-latest"]
206+
os: ["blacksmith-4vcpu-ubuntu-2204"]
212207

213208
steps:
214209
- name: Install apt packages
215-
if: startsWith(matrix.os, 'ubuntu-')
216210
run: |
217211
sudo apt update
218212
- uses: actions/checkout@v4
219213
- name: Set up Python ${{ matrix.python-version }}
220-
uses: actions/setup-python@v5
214+
uses: useblacksmith/setup-python@v6
221215
with:
222216
python-version: ${{ matrix.python-version }}
223217
cache: 'pip'
@@ -241,16 +235,15 @@ jobs:
241235
fail-fast: false
242236
matrix:
243237
python-version: ["3.12"]
244-
os: ["ubuntu-latest"]
238+
os: ["blacksmith-4vcpu-ubuntu-2204"]
245239

246240
steps:
247241
- name: Install apt packages
248-
if: startsWith(matrix.os, 'ubuntu-')
249242
run: |
250243
sudo apt update
251244
- uses: actions/checkout@v4
252245
- name: Set up Python ${{ matrix.python-version }}
253-
uses: actions/setup-python@v5
246+
uses: useblacksmith/setup-python@v6
254247
with:
255248
python-version: ${{ matrix.python-version }}
256249
cache: 'pip'
@@ -274,16 +267,15 @@ jobs:
274267
fail-fast: false
275268
matrix:
276269
python-version: ["3.12"]
277-
os: ["ubuntu-latest"]
270+
os: ["blacksmith-4vcpu-ubuntu-2204"]
278271

279272
steps:
280273
- name: Install apt packages
281-
if: startsWith(matrix.os, 'ubuntu-')
282274
run: |
283275
sudo apt update
284276
- uses: actions/checkout@v4
285277
- name: Set up Python ${{ matrix.python-version }}
286-
uses: actions/setup-python@v5
278+
uses: useblacksmith/setup-python@v6
287279
with:
288280
python-version: ${{ matrix.python-version }}
289281
cache: 'pip'
@@ -307,16 +299,15 @@ jobs:
307299
fail-fast: false
308300
matrix:
309301
python-version: ["3.12"]
310-
os: ["ubuntu-latest"]
302+
os: ["blacksmith-4vcpu-ubuntu-2204"]
311303

312304
steps:
313305
- name: Install apt packages
314-
if: startsWith(matrix.os, 'ubuntu-')
315306
run: |
316307
sudo apt update
317308
- uses: actions/checkout@v4
318309
- name: Set up Python ${{ matrix.python-version }}
319-
uses: actions/setup-python@v5
310+
uses: useblacksmith/setup-python@v6
320311
with:
321312
python-version: ${{ matrix.python-version }}
322313
cache: 'pip'

.github/workflows/linter.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on: [pull_request]
55
jobs:
66
check:
77
name: ${{ matrix.check }} check
8-
runs-on: ubuntu-latest
8+
runs-on: blacksmith-4vcpu-ubuntu-2204
99
strategy:
1010
matrix:
1111
check: [lint, mypy]

.github/workflows/parallel-support.yml

+4-8
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
fail-fast: false
3838
matrix:
3939
python-version: ["3.12"]
40-
os: ["ubuntu-latest"]
40+
os: ["blacksmith-4vcpu-ubuntu-2204"]
4141

4242
steps:
4343
- name: Fetch Docker Images
@@ -47,19 +47,17 @@ jobs:
4747
docker pull memcached:latest
4848
4949
- name: Install apt packages
50-
if: startsWith(matrix.os, 'ubuntu-')
5150
run: |
5251
sudo apt update
5352
- uses: actions/checkout@v4
5453
- name: Set up Python ${{ matrix.python-version }}
55-
uses: actions/setup-python@v5
54+
uses: useblacksmith/setup-python@v6
5655
with:
5756
python-version: ${{ matrix.python-version }}
5857
cache: 'pip'
5958
cache-dependency-path: '**/setup.py'
6059

6160
- name: Install Poetry
62-
if: startsWith(matrix.os, 'ubuntu-')
6361
uses: snok/[email protected]
6462

6563
- name: Install tox
@@ -79,7 +77,7 @@ jobs:
7977
fail-fast: false
8078
matrix:
8179
python-version: ["3.12"]
82-
os: ["ubuntu-latest"]
80+
os: ["blacksmith-4vcpu-ubuntu-2204"]
8381

8482
steps:
8583
- name: Fetch Docker Images
@@ -89,19 +87,17 @@ jobs:
8987
docker pull memcached:latest
9088
9189
- name: Install apt packages
92-
if: startsWith(matrix.os, 'ubuntu-')
9390
run: |
9491
sudo apt update
9592
- uses: actions/checkout@v4
9693
- name: Set up Python ${{ matrix.python-version }}
97-
uses: actions/setup-python@v5
94+
uses: useblacksmith/setup-python@v6
9895
with:
9996
python-version: ${{ matrix.python-version }}
10097
cache: 'pip'
10198
cache-dependency-path: '**/setup.py'
10299

103100
- name: Install Poetry
104-
if: startsWith(matrix.os, 'ubuntu-')
105101
uses: snok/[email protected]
106102

107103
- name: Install tox

.github/workflows/python-package.yml

+6-12
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
fail-fast: false
3838
matrix:
3939
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
40-
os: ["ubuntu-latest"]
40+
os: ["blacksmith-4vcpu-ubuntu-2204"]
4141

4242
steps:
4343
- name: Fetch Docker Images
@@ -47,19 +47,17 @@ jobs:
4747
docker pull memcached:latest
4848
4949
- name: Install apt packages
50-
if: startsWith(matrix.os, 'ubuntu-')
5150
run: |
5251
sudo apt update
5352
- uses: actions/checkout@v4
5453
- name: Set up Python ${{ matrix.python-version }}
55-
uses: actions/setup-python@v5
54+
uses: useblacksmith/setup-python@v6
5655
with:
5756
python-version: ${{ matrix.python-version }}
5857
cache: 'pip'
5958
cache-dependency-path: '**/setup.py'
6059

6160
- name: Install Poetry
62-
if: startsWith(matrix.os, 'ubuntu-')
6361
uses: snok/[email protected]
6462

6563
- name: Install tox
@@ -89,7 +87,7 @@ jobs:
8987
fail-fast: false
9088
matrix:
9189
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
92-
os: ["ubuntu-latest"]
90+
os: ["blacksmith-4vcpu-ubuntu-2204"]
9391

9492
steps:
9593
- name: Fetch Docker Images
@@ -99,19 +97,17 @@ jobs:
9997
docker pull memcached:latest
10098
10199
- name: Install apt packages
102-
if: startsWith(matrix.os, 'ubuntu-')
103100
run: |
104101
sudo apt update
105102
- uses: actions/checkout@v4
106103
- name: Set up Python ${{ matrix.python-version }}
107-
uses: actions/setup-python@v5
104+
uses: useblacksmith/setup-python@v6
108105
with:
109106
python-version: ${{ matrix.python-version }}
110107
cache: 'pip'
111108
cache-dependency-path: '**/setup.py'
112109

113110
- name: Install Poetry
114-
if: startsWith(matrix.os, 'ubuntu-')
115111
uses: snok/[email protected]
116112

117113
- name: Install tox
@@ -134,7 +130,7 @@ jobs:
134130
fail-fast: false
135131
matrix:
136132
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
137-
os: ["ubuntu-latest"]
133+
os: ["blacksmith-4vcpu-ubuntu-2204"]
138134

139135
steps:
140136
- name: Fetch Docker Images
@@ -144,19 +140,17 @@ jobs:
144140
docker pull memcached:latest
145141
146142
- name: Install apt packages
147-
if: startsWith(matrix.os, 'ubuntu-')
148143
run: |
149144
sudo apt update
150145
- uses: actions/checkout@v4
151146
- name: Set up Python ${{ matrix.python-version }}
152-
uses: actions/setup-python@v5
147+
uses: useblacksmith/setup-python@v6
153148
with:
154149
python-version: ${{ matrix.python-version }}
155150
cache: 'pip'
156151
cache-dependency-path: '**/setup.py'
157152

158153
- name: Install Poetry
159-
if: startsWith(matrix.os, 'ubuntu-')
160154
uses: snok/[email protected]
161155

162156
- name: Install tox

.github/workflows/semgrep.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ name: Semgrep
1414
jobs:
1515
semgrep:
1616
name: Scan
17-
runs-on: ubuntu-20.04
17+
runs-on: blacksmith-4vcpu-ubuntu-2204
1818
env:
1919
SEMGREP_APP_TOKEN: ${{ secrets.SEMGREP_APP_TOKEN }}
2020
container:

0 commit comments

Comments
 (0)