File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88 - ' v*'
99 workflow_dispatch :
1010 inputs :
11+ source_ref :
12+ description : ' Branch, tag, or SHA to build'
13+ required : true
14+ type : string
1115 release_tag :
1216 description : ' Release tag name (e.g., v1.0.0)'
1317 required : true
2226 steps :
2327 - name : Checkout code
2428 uses : actions/checkout@v4
29+ with :
30+ ref : ${{ github.event_name == 'workflow_dispatch' && inputs.source_ref || github.ref }}
2531
2632 - name : Setup PHP
2733 uses : shivammathur/setup-php@v2
6066
6167 - name : Add build metadata
6268 run : |
63- echo "BUILD_SHA=${{ github.sha }} " >> .build-metadata
69+ echo "BUILD_SHA=$(git rev-parse HEAD) " >> .build-metadata
6470 echo "BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> .build-metadata
65- echo "BUILD_REF=${{ steps.release_tag.outputs.tag }}" >> .build-metadata
71+ echo "BUILD_REF=${{ github.event_name == 'workflow_dispatch' && inputs.source_ref || github.ref_name }}" >> .build-metadata
6672
6773 - name : Set CLI version in box.json
6874 run : sed -i 's/\$CLI_VERSION/${{ steps.release_tag.outputs.tag }}/' box.json
You can’t perform that action at this time.
0 commit comments