Files
basango/.github/workflows/backend_audit.yaml
T

55 lines
1.4 KiB
YAML

name: api-legacy audit
defaults:
run:
working-directory: projects/api-legacy
on:
workflow_call:
push:
branches-ignore:
- main
paths:
- "../../basango/apps/api-legacy/**"
- ".github/workflows/backend_*.yaml"
pull_request:
branches-ignore:
- main
paths:
- "../../basango/apps/api-legacy/**"
- ".github/workflows/backend_*.yaml"
jobs:
audit:
name: composer audit
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.4
tools: composer:v2
- name: Setup cache
run: echo "COMPOSER_CACHE_DIR=$(composer config cache-dir)" >> $GITHUB_ENV
- name: Cache dependencies installed with composer
uses: actions/cache@v4
with:
path: ${{ env.COMPOSER_CACHE_DIR }}
key: php8.4-composer-${{ hashFiles('projects/api-legacy/composer.lock') }}
restore-keys: |
php8.4-composer-latest-
- name: Update composer
run: composer self-update
- name: Install dependencies with composer
run: composer install --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi
- name: Security Audit with composer
run: composer audit
continue-on-error: true