Skip to content

Commit 910346f

Browse files
committed
Chore(ci) - Use specific images on GitHub actions
1 parent 4c3b848 commit 910346f

File tree

3 files changed

+30
-30
lines changed

3 files changed

+30
-30
lines changed

.github/workflows/main.yml

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ jobs:
2222
fail-fast: false
2323
steps:
2424
- name: Checkout
25-
uses: actions/checkout@v4.1.1
25+
uses: actions/checkout@sha256:b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
2626
with:
2727
fetch-depth: '0'
2828

2929
- name: Setup PHP, with composer and extensions
30-
uses: shivammathur/setup-php@v2 # https://github.com/shivammathur/setup-php
30+
uses: shivammathur/setup-php@sha256:7fdd3ece872ec7ec4c098ae5ab7637d5e0a96067 # v2.26.0
3131
with:
3232
php-version: '8.2'
3333
tools: composer:v2
@@ -37,7 +37,7 @@ jobs:
3737
run: echo "CACHE_DIR=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
3838

3939
- name: Cache composer dependencies
40-
uses: actions/cache@v3
40+
uses: actions/cache@sha256:704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
4141
with:
4242
path: ${{ steps.composer-cache.outputs.CACHE_DIR }}
4343
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
@@ -55,7 +55,7 @@ jobs:
5555
composer --version
5656
5757
- name: PHP Security Checker
58-
uses: symfonycorp/security-checker-action@v5
58+
uses: symfonycorp/security-checker-action@sha256:258311ef7ac571f1310780ef3d79fc5abef642b5 # v5
5959

6060
- name: Check that application doesn't have installed dependencies with known security vulnerabilities
6161
run: make check-security
@@ -67,12 +67,12 @@ jobs:
6767
fail-fast: false
6868
steps:
6969
- name: Checkout
70-
uses: actions/checkout@v4.1.1
70+
uses: actions/checkout@sha256:b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
7171
with:
7272
fetch-depth: '0'
7373

7474
- name: Setup PHP, with composer and extensions
75-
uses: shivammathur/setup-php@v2 # https://github.com/shivammathur/setup-php
75+
uses: shivammathur/setup-php@sha256:7fdd3ece872ec7ec4c098ae5ab7637d5e0a96067 # v2.26.0
7676
with:
7777
php-version: '8.2'
7878
tools: composer:v2
@@ -82,7 +82,7 @@ jobs:
8282
run: echo "CACHE_DIR=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
8383

8484
- name: Cache composer dependencies
85-
uses: actions/cache@v3
85+
uses: actions/cache@sha256:704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
8686
with:
8787
path: ${{ steps.composer-cache.outputs.CACHE_DIR }}
8888
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
@@ -118,12 +118,12 @@ jobs:
118118
fail-fast: false
119119
steps:
120120
- name: Checkout
121-
uses: actions/checkout@v4.1.1
121+
uses: actions/checkout@sha256:b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
122122
with:
123123
fetch-depth: '0'
124124

125125
- name: Setup PHP, with composer and extensions
126-
uses: shivammathur/setup-php@v2 # https://github.com/shivammathur/setup-php
126+
uses: shivammathur/setup-php@sha256:7fdd3ece872ec7ec4c098ae5ab7637d5e0a96067 # v2.26.0
127127
with:
128128
php-version: '8.2'
129129
tools: composer:v2
@@ -133,7 +133,7 @@ jobs:
133133
run: echo "CACHE_DIR=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
134134

135135
- name: Cache composer dependencies
136-
uses: actions/cache@v3
136+
uses: actions/cache@sha256:704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
137137
with:
138138
path: ${{ steps.composer-cache.outputs.CACHE_DIR }}
139139
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
@@ -176,13 +176,13 @@ jobs:
176176
run: make phpinsights
177177

178178
- name: Archive Psalm results (psalm.json)
179-
uses: actions/upload-artifact@v3
179+
uses: actions/upload-artifact@sha256:a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
180180
with:
181181
name: psalm.json
182182
path: ./build/psalm.json
183183

184184
- name: Archive `phploc` results (phploc.json)
185-
uses: actions/upload-artifact@v3
185+
uses: actions/upload-artifact@sha256:a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
186186
with:
187187
name: phploc.json
188188
path: ./build/phploc.json
@@ -207,12 +207,12 @@ jobs:
207207
fail-fast: false
208208
steps:
209209
- name: Checkout
210-
uses: actions/checkout@v4.1.1
210+
uses: actions/checkout@sha256:b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
211211
with:
212212
fetch-depth: '0'
213213

214214
- name: Setup PHP, with composer and extensions
215-
uses: shivammathur/setup-php@v2 # https://github.com/shivammathur/setup-php
215+
uses: shivammathur/setup-php@sha256:7fdd3ece872ec7ec4c098ae5ab7637d5e0a96067 # v2.26.0
216216
with:
217217
php-version: '8.2'
218218
extensions: pdo_mysql, mysql
@@ -224,7 +224,7 @@ jobs:
224224
run: echo "CACHE_DIR=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
225225

226226
- name: Cache composer dependencies
227-
uses: actions/cache@v3
227+
uses: actions/cache@sha256:704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
228228
with:
229229
path: ${{ steps.composer-cache.outputs.CACHE_DIR }}
230230
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
@@ -288,25 +288,25 @@ jobs:
288288
run: make phpmetrics
289289

290290
- name: Archive code coverage results (clover.xml)
291-
uses: actions/upload-artifact@v3
291+
uses: actions/upload-artifact@sha256:a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
292292
with:
293293
name: clover.xml
294294
path: ./build/logs/clover.xml
295295

296296
- name: Archive code coverage results (junit.xml)
297-
uses: actions/upload-artifact@v3
297+
uses: actions/upload-artifact@sha256:a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
298298
with:
299299
name: junit.xml
300300
path: ./build/logs/junit.xml
301301

302302
- name: Archive Code Coverage
303-
uses: actions/upload-artifact@v3
303+
uses: actions/upload-artifact@sha256:a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
304304
with:
305305
name: PhpMetrics
306306
path: ./build/report
307307

308308
- name: Archive PhpMetrics results
309-
uses: actions/upload-artifact@v3
309+
uses: actions/upload-artifact@sha256:a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
310310
with:
311311
name: PhpMetrics
312312
path: ./build/phpmetrics
@@ -317,28 +317,28 @@ jobs:
317317

318318
steps:
319319
- name: Make checkout
320-
uses: actions/checkout@v4.1.1
320+
uses: actions/checkout@sha256:b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
321321

322322
- name: Lint `./README.md`
323-
uses: avto-dev/markdown-lint@v1
323+
uses: avto-dev/markdown-lint@sha256:04d43ee9191307b50935a753da3b775ab695eceb # v1.5.0
324324
with:
325325
config: './markdown-lint.yml'
326326
args: './README.md'
327327

328328
- name: Lint all the resource docs under `./doc/` directory
329-
uses: avto-dev/markdown-lint@v1
329+
uses: avto-dev/markdown-lint@sha256:04d43ee9191307b50935a753da3b775ab695eceb # v1.5.0
330330
with:
331331
config: './markdown-lint.yml'
332332
args: './doc/*.md'
333333

334334
- name: Lint all the docs under `./docker/` directory
335-
uses: avto-dev/markdown-lint@v1
335+
uses: avto-dev/markdown-lint@sha256:04d43ee9191307b50935a753da3b775ab695eceb # v1.5.0
336336
with:
337337
config: './markdown-lint.yml'
338338
args: './docker/*.md'
339339

340340
- name: Lint all the docs under `./secrets/` directory
341-
uses: avto-dev/markdown-lint@v1
341+
uses: avto-dev/markdown-lint@sha256:04d43ee9191307b50935a753da3b775ab695eceb # v1.5.0
342342
with:
343343
config: './markdown-lint.yml'
344344
args: './secrets/*.md'
@@ -350,7 +350,7 @@ jobs:
350350
- test
351351

352352
steps:
353-
- uses: actions/checkout@v4.1.1
353+
- uses: actions/checkout@sha256:b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
354354

355355
- name: Set tag var
356356
id: vars

.github/workflows/scorecard.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@ jobs:
3434

3535
steps:
3636
- name: "Checkout code"
37-
uses: actions/checkout@v4.1.1
37+
uses: actions/checkout@sha256:b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
3838
with:
3939
persist-credentials: false
4040

4141
- name: "Run analysis"
42-
uses: ossf/scorecard-action@v2.3.1
42+
uses: ossf/scorecard-action@sha256:0864cf19026789058feabb7e87baa5f140aac736 # vv2.3.1
4343
with:
4444
results_file: results.sarif
4545
results_format: sarif
@@ -61,7 +61,7 @@ jobs:
6161
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
6262
# format to the repository Actions tab.
6363
- name: "Upload artifact"
64-
uses: actions/upload-artifact@v3.1.0
64+
uses: actions/upload-artifact@sha256:a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
6565
with:
6666
name: SARIF file
6767
path: results.sarif

.github/workflows/vulnerability-scan.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ jobs:
1414

1515
steps:
1616
- name: Checkout code
17-
uses: actions/checkout@v4.1.1
17+
uses: actions/checkout@sha256:b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
1818

1919
- name: Build the Docker image
2020
run: docker build . --file Dockerfile --tag symfony-flex-backend:master
2121

2222
- name: Scan image with trivy
23-
uses: lazy-actions/gitrivy@v3
23+
uses: lazy-actions/gitrivy@sha356:6edf95fdc8b1fb841a974536316b209cd16f9000 # v3
2424
with:
2525
image-ref: symfony-flex-backend:master
2626
format: 'table'

0 commit comments

Comments
 (0)