normalize workflow input defaults
This commit is contained in:
parent
e1a8af7f83
commit
f5492f01c6
|
|
@ -13,10 +13,12 @@ on:
|
|||
inputs:
|
||||
Release:
|
||||
description: '是否上传到Github'
|
||||
default: 'true'
|
||||
type: boolean
|
||||
default: true
|
||||
SharePoint:
|
||||
description: '是否上传到SharePoint'
|
||||
default: 'true'
|
||||
type: boolean
|
||||
default: true
|
||||
Tempoary_IP:
|
||||
description: '固件 IP 地址 [可选]'
|
||||
default: '192.168.2.200'
|
||||
|
|
@ -78,8 +80,8 @@ jobs:
|
|||
id: date
|
||||
run: |
|
||||
echo "date=$(date +'%Y-%m-%d')" >> "$GITHUB_OUTPUT"
|
||||
echo "Release=${{ github.event.inputs.Release }}" >> $GITHUB_ENV
|
||||
echo "SharePoint=${{ github.event.inputs.SharePoint }}" >> $GITHUB_ENV
|
||||
echo "Release=${{ github.event.inputs.Release || 'true' }}" >> $GITHUB_ENV
|
||||
echo "SharePoint=${{ github.event.inputs.SharePoint || 'true' }}" >> $GITHUB_ENV
|
||||
echo "data2=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
|
||||
echo "NOW_DATA_VERSION=v$(date +'%Y-%m-%d')" >> $GITHUB_ENV
|
||||
if [ "${{ env.DELETE_USELESS_FILES }}" == true ]
|
||||
|
|
|
|||
|
|
@ -13,10 +13,12 @@ on:
|
|||
inputs:
|
||||
Release:
|
||||
description: '是否上传到Github'
|
||||
default: 'true'
|
||||
type: boolean
|
||||
default: true
|
||||
SharePoint:
|
||||
description: '是否上传到SharePoint'
|
||||
default: 'true'
|
||||
type: boolean
|
||||
default: true
|
||||
Tempoary_IP:
|
||||
description: '固件 IP 地址 [可选]'
|
||||
default: '192.168.2.200'
|
||||
|
|
@ -93,8 +95,8 @@ jobs:
|
|||
id: date
|
||||
run: |
|
||||
echo "date=$(date +'%Y-%m-%d')" >> "$GITHUB_OUTPUT"
|
||||
echo "Release=${{ github.event.inputs.Release }}" >> $GITHUB_ENV
|
||||
echo "SharePoint=${{ github.event.inputs.SharePoint }}" >> $GITHUB_ENV
|
||||
echo "Release=${{ github.event.inputs.Release || 'true' }}" >> $GITHUB_ENV
|
||||
echo "SharePoint=${{ github.event.inputs.SharePoint || 'true' }}" >> $GITHUB_ENV
|
||||
echo "data2=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
|
||||
echo "NOW_DATA_VERSION=v$(date +'%Y-%m-%d')" >> $GITHUB_ENV
|
||||
|
||||
|
|
|
|||
|
|
@ -13,10 +13,12 @@ on:
|
|||
inputs:
|
||||
Release:
|
||||
description: '是否上传到Github'
|
||||
default: 'true'
|
||||
type: boolean
|
||||
default: true
|
||||
SharePoint:
|
||||
description: '是否上传到SharePoint'
|
||||
default: 'true'
|
||||
type: boolean
|
||||
default: true
|
||||
Tempoary_IP:
|
||||
description: '固件 IP 地址 [可选]'
|
||||
default: '192.168.2.200'
|
||||
|
|
@ -94,8 +96,8 @@ jobs:
|
|||
id: date
|
||||
run: |
|
||||
echo "date=$(date +'%Y-%m-%d')" >> "$GITHUB_OUTPUT"
|
||||
echo "Release=${{ github.event.inputs.Release }}" >> $GITHUB_ENV
|
||||
echo "SharePoint=${{ github.event.inputs.SharePoint }}" >> $GITHUB_ENV
|
||||
echo "Release=${{ github.event.inputs.Release || 'true' }}" >> $GITHUB_ENV
|
||||
echo "SharePoint=${{ github.event.inputs.SharePoint || 'true' }}" >> $GITHUB_ENV
|
||||
echo "data2=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
|
||||
echo "NOW_DATA_VERSION=v$(date +'%Y-%m-%d')" >> $GITHUB_ENV
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,12 @@
|
|||
# AI Modification Log: Workflow Input Defaults
|
||||
|
||||
Date: 2026-06-29
|
||||
|
||||
## Change
|
||||
|
||||
- Added `type: boolean` to the `Release` and `SharePoint` workflow dispatch inputs in X/Y/Z workflows.
|
||||
- Changed env export lines to default `Release` and `SharePoint` to `true` when `github.event.inputs` is absent, such as repository dispatch runs.
|
||||
|
||||
## Reason
|
||||
|
||||
The workflows also support `repository_dispatch`, where `github.event.inputs` is not populated. Without explicit fallback values, release and SharePoint conditions can see empty strings and skip expected upload steps.
|
||||
Loading…
Reference in New Issue