mirror of
https://github.com/kernelkit/infix.git
synced 2026-07-22 01:13:00 +02:00
CI: add pre-test-script workflow call variable
This allows a caller (Spin) to run arbitrary code before test starts. Signed-off-by: Richard Alpe <richard@bit42.se>
This commit is contained in:
@@ -29,6 +29,11 @@ on:
|
||||
required: false
|
||||
type: string
|
||||
default: 'test'
|
||||
pre_test_script:
|
||||
required: false
|
||||
type: string
|
||||
default: ''
|
||||
description: 'Optional script to run after checkout (for spin customization)'
|
||||
secrets:
|
||||
CHECKOUT_TOKEN:
|
||||
required: false
|
||||
@@ -65,6 +70,15 @@ jobs:
|
||||
submodules: recursive
|
||||
token: ${{ secrets.CHECKOUT_TOKEN || github.token }}
|
||||
|
||||
- name: Run pre-test script
|
||||
if: ${{ inputs.pre_test_script != '' }}
|
||||
run: |
|
||||
cat > ./pre-test.sh << 'EOF'
|
||||
${{ inputs.pre_test_script }}
|
||||
EOF
|
||||
chmod +x ./pre-test.sh
|
||||
bash ./pre-test.sh
|
||||
|
||||
- name: Set Build Variables
|
||||
id: vars
|
||||
run: |
|
||||
|
||||
Reference in New Issue
Block a user