Skip to content

Commit

Permalink
Merge pull request #2715 from tarlepp/chore(env)/github-actions-update
Browse files Browse the repository at this point in the history
Chore(env) - GitHub actions update
  • Loading branch information
tarlepp committed Mar 24, 2024
2 parents d560285 + c612634 commit 4ea2b2b
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 31 deletions.
50 changes: 25 additions & 25 deletions .github/workflows/main.yml
Expand Up @@ -25,12 +25,12 @@ jobs:
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
uses: actions/checkout@v4
with:
fetch-depth: '0'

- name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@e6f75134d35752277f093989e72e140eaa222f35 # v2.28.0
uses: shivammathur/setup-php@v2
with:
php-version: '8.3'
tools: composer:v2
Expand All @@ -40,7 +40,7 @@ jobs:
run: echo "CACHE_DIR=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT

- name: Cache composer dependencies
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.CACHE_DIR }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
Expand All @@ -58,7 +58,7 @@ jobs:
composer --version
- name: PHP Security Checker
uses: symfonycorp/security-checker-action@258311ef7ac571f1310780ef3d79fc5abef642b5 # v5
uses: symfonycorp/security-checker-action@v5

- name: Check that application doesn't have installed dependencies with known security vulnerabilities
run: make check-security
Expand All @@ -70,12 +70,12 @@ jobs:
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
uses: actions/checkout@v4
with:
fetch-depth: '0'

- name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@e6f75134d35752277f093989e72e140eaa222f35 # v2.28.0
uses: shivammathur/setup-php@v2
with:
php-version: '8.3'
tools: composer:v2
Expand All @@ -85,7 +85,7 @@ jobs:
run: echo "CACHE_DIR=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT

- name: Cache composer dependencies
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.CACHE_DIR }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
Expand Down Expand Up @@ -121,12 +121,12 @@ jobs:
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
uses: actions/checkout@v4
with:
fetch-depth: '0'

- name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@e6f75134d35752277f093989e72e140eaa222f35 # v2.28.0
uses: shivammathur/setup-php@v2
with:
php-version: '8.3'
tools: composer:v2
Expand All @@ -136,7 +136,7 @@ jobs:
run: echo "CACHE_DIR=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT

- name: Cache composer dependencies
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.CACHE_DIR }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
Expand Down Expand Up @@ -178,13 +178,13 @@ jobs:
run: make phpinsights

- name: Archive Psalm results (psalm.json)
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
uses: actions/upload-artifact@v4
with:
name: psalm.json
path: ./build/psalm.json

- name: Archive `phploc` results (phploc.json)
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
uses: actions/upload-artifact@v4
with:
name: phploc.json
path: ./build/phploc.json
Expand All @@ -209,12 +209,12 @@ jobs:
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
uses: actions/checkout@v4
with:
fetch-depth: '0'

- name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@e6f75134d35752277f093989e72e140eaa222f35 # v2.28.0
uses: shivammathur/setup-php@v2
with:
php-version: '8.3'
extensions: pdo_mysql, mysql
Expand All @@ -226,7 +226,7 @@ jobs:
run: echo "CACHE_DIR=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT

- name: Cache composer dependencies
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.CACHE_DIR }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
Expand Down Expand Up @@ -290,25 +290,25 @@ jobs:
run: make phpmetrics

- name: Archive code coverage results (clover.xml)
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
uses: actions/upload-artifact@v4
with:
name: clover.xml
path: ./build/logs/clover.xml

- name: Archive code coverage results (junit.xml)
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
uses: actions/upload-artifact@v4
with:
name: junit.xml
path: ./build/logs/junit.xml

- name: Archive Code Coverage
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
uses: actions/upload-artifact@v4
with:
name: PhpMetrics
path: ./build/report

- name: Archive PhpMetrics results
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
uses: actions/upload-artifact@v4
with:
name: PhpMetrics
path: ./build/phpmetrics
Expand All @@ -319,28 +319,28 @@ jobs:

steps:
- name: Make checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
uses: actions/checkout@v4

- name: Lint `./README.md`
uses: avto-dev/markdown-lint@04d43ee9191307b50935a753da3b775ab695eceb # v1.5.0
uses: avto-dev/markdown-lint@v1
with:
config: './markdown-lint.yml'
args: './README.md'

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

- name: Lint all the docs under `./docker/` directory
uses: avto-dev/markdown-lint@04d43ee9191307b50935a753da3b775ab695eceb # v1.5.0
uses: avto-dev/markdown-lint@v1
with:
config: './markdown-lint.yml'
args: './docker/*.md'

- name: Lint all the docs under `./secrets/` directory
uses: avto-dev/markdown-lint@04d43ee9191307b50935a753da3b775ab695eceb # v1.5.0
uses: avto-dev/markdown-lint@v1
with:
config: './markdown-lint.yml'
args: './secrets/*.md'
Expand All @@ -352,7 +352,7 @@ jobs:
- test

steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/checkout@v4

- name: Set tag var
id: vars
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/scorecard.yml
Expand Up @@ -34,12 +34,12 @@ jobs:

steps:
- name: "Checkout code"
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
uses: actions/checkout@v4
with:
persist-credentials: false

- name: "Run analysis"
uses: ossf/scorecard-action@0864cf19026789058feabb7e87baa5f140aac736 # vv2.3.1
uses: ossf/scorecard-action@v2
with:
results_file: results.sarif
results_format: sarif
Expand All @@ -61,14 +61,14 @@ jobs:
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
# format to the repository Actions tab.
- name: "Upload artifact"
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
uses: actions/upload-artifact@v3
with:
name: SARIF file
path: results.sarif
retention-days: 5

# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@v2.22.8
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: results.sarif
4 changes: 2 additions & 2 deletions .github/workflows/vulnerability-scan.yml
Expand Up @@ -14,13 +14,13 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
uses: actions/checkout@v4

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

- name: Scan image with trivy
uses: lazy-actions/gitrivy@sha356:6edf95fdc8b1fb841a974536316b209cd16f9000 # v3
uses: lazy-actions/gitrivy@v4
with:
image-ref: symfony-flex-backend:master
format: 'table'
Expand Down

0 comments on commit 4ea2b2b

Please sign in to comment.