Skip to content

Commit

Permalink
Tune Audit workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
a-menshchikov committed Oct 28, 2023
1 parent e9e69a9 commit 61b7bd0
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions .github/workflows/audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,18 @@ jobs:
fail-fast: false
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Checkout (Push)
uses: actions/checkout@v4
if: github.event_name == 'push'
with:
fetch-depth: 0

- name: Checkout (PR)
uses: actions/checkout@v4
if: github.event_name == 'pull_request'
with:
ref: ${{ github.event.pull_request.head.ref }}
fetch-depth: 0

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand All @@ -25,12 +35,12 @@ jobs:

- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
run: echo "DIR=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT

- name: Cache dependencies
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
path: ${{ steps.composer-cache.outputs.DIR }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ runner.os }}-composer-

Expand All @@ -43,7 +53,7 @@ jobs:
vendor/bin/simple-phpunit install
echo "::endgroup::"
- name: Audit
- name: Auditor
uses: docker://nbgrp/auditor:0.20.0

- name: Tests
Expand Down

0 comments on commit 61b7bd0

Please sign in to comment.