Change unit-tests.yml workflow to include conditional checkout step

This commit is contained in:
mikiher 2024-03-17 07:36:13 +02:00
parent 88f9533b37
commit d562f6a69f

View File

@ -11,13 +11,19 @@ on:
jobs:
run-unit-tests:
name: Run Unit Tests
runs-on: ubuntu-latest
steps:
- name: Checkout code
- name: Checkout (push/pull request)
uses: actions/checkout@v4
if: github.event_name != 'workflow_dispatch'
- name: Checkout (workflow_dispatch)
uses: actions/checkout@v4
with:
ref: ${{ github.event_name != 'workflow_dispatch' && github.ref_name || inputs.ref}}
ref: inputs.ref
if: github.event_name == 'workflow_dispatch'
- name: Set up Node.js
uses: actions/setup-node@v4