mirror of
https://github.com/kernelkit/infix.git
synced 2026-07-29 20:23:01 +02:00
Merge pull request #1239 from kernelkit/ci-improvements
CI: Allow upstream caller to run pre build script [skip ci]
This commit is contained in:
@@ -36,6 +36,15 @@ on:
|
|||||||
required: false
|
required: false
|
||||||
type: boolean
|
type: boolean
|
||||||
default: true
|
default: true
|
||||||
|
pre_build_script:
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
default: ''
|
||||||
|
description: 'Optional script to run after checkout (for spin customization)'
|
||||||
|
secrets:
|
||||||
|
CHECKOUT_TOKEN:
|
||||||
|
required: false
|
||||||
|
description: 'Token for cross-repository access'
|
||||||
|
|
||||||
env:
|
env:
|
||||||
NAME: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.name || inputs.name }}
|
NAME: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.name || inputs.name }}
|
||||||
@@ -77,6 +86,16 @@ jobs:
|
|||||||
clean: true
|
clean: true
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
|
token: ${{ secrets.CHECKOUT_TOKEN || github.token }}
|
||||||
|
|
||||||
|
- name: Run pre-build script
|
||||||
|
if: ${{ inputs.pre_build_script != '' }}
|
||||||
|
run: |
|
||||||
|
cat > ./pre-build.sh << 'EOF'
|
||||||
|
${{ inputs.pre_build_script }}
|
||||||
|
EOF
|
||||||
|
chmod +x ./pre-build.sh
|
||||||
|
bash ./pre-build.sh
|
||||||
|
|
||||||
- name: Set Build Variables
|
- name: Set Build Variables
|
||||||
id: vars
|
id: vars
|
||||||
|
|||||||
@@ -29,6 +29,10 @@ on:
|
|||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
default: 'test'
|
default: 'test'
|
||||||
|
secrets:
|
||||||
|
CHECKOUT_TOKEN:
|
||||||
|
required: false
|
||||||
|
description: 'Token for cross-repository access'
|
||||||
|
|
||||||
env:
|
env:
|
||||||
TARGET: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.target || inputs.target }}
|
TARGET: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.target || inputs.target }}
|
||||||
@@ -59,6 +63,7 @@ jobs:
|
|||||||
clean: true
|
clean: true
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
|
token: ${{ secrets.CHECKOUT_TOKEN || github.token }}
|
||||||
|
|
||||||
- name: Set Build Variables
|
- name: Set Build Variables
|
||||||
id: vars
|
id: vars
|
||||||
|
|||||||
+1
-1
Submodule buildroot updated: c32a08efd2...658015549a
Reference in New Issue
Block a user