File tree Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Original file line number Diff line number Diff line change 77 version :
88 description : " Version Number"
99 type : string
10+ push :
11+ tags :
12+ - v[0-9]+.[0-9]+.[0-9]+
1013env :
1114 VERSION : 4.8
1215jobs :
1316 version :
14- if : ${{ github.event_name == 'schedule' }}
1517 runs-on : ubuntu-latest
1618 outputs :
17- version : ${{ steps.version.outputs.version }}
19+ version : ${{ steps.version.outputs.version || steps.custom.outputs.version || steps.tag.outputs.version }}
1820 steps :
19- - name : Log Version
20- run : date +'%Y%m%d-%H%M'
2121 - name : Output Version
2222 id : version
23+ if : ${{ github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && inputs.version == '' ) }}
2324 run : echo "version=$(date +'%Y%m%d-%H%M')" >> $GITHUB_OUTPUT
25+ - name : Output Custom Version
26+ id : custom
27+ if : ${{ github.event_name == 'workflow_dispatch' && inputs.version != '' }}
28+ run : echo "version=${{ inputs.version }}" >> $GITHUB_OUTPUT
29+ - name : Output Tag
30+ id : tag
31+ if : ${{ github.event_name == 'push' }}
32+ run : echo "version=$(echo ${GITHUB_REF#refs/*/} | sed -e 's/v//')" >> $GITHUB_OUTPUT
2433 test :
2534 strategy :
2635 matrix :
You can’t perform that action at this time.
0 commit comments