File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11name : version
2- description : Resolve FRANKENPHP_VERSION from the current ref (stripped tag name, with commit SHA fallback)
2+ description : Resolve the FrankenPHP version from the current ref (stripped tag name, with commit SHA fallback)
33inputs :
44 ref :
55 description : Optional ref override (e.g. tag name resolved by a prepare job for schedule/dispatch flows)
66 required : false
77 default : " "
8+ outputs :
9+ version :
10+ description : Resolved version string
11+ value : ${{ steps.resolve.outputs.version }}
812runs :
913 using : composite
1014 steps :
11- - shell : bash
15+ - id : resolve
16+ shell : bash
1217 env :
1318 REF : ${{ inputs.ref }}
14- run : | # zizmor: ignore[github-env]
19+ run : |
1520 if [ "${GITHUB_REF_TYPE}" = "tag" ]; then
1621 version="${GITHUB_REF_NAME#v}"
1722 elif [ -n "${REF}" ]; then
2025 version="${GITHUB_SHA}"
2126 fi
2227 if [[ ! "${version}" =~ ^[A-Za-z0-9._-]+$ ]]; then
23- echo "::error::invalid FRANKENPHP_VERSION value: ${version}" >&2
28+ echo "::error::invalid version value: ${version}" >&2
2429 exit 1
2530 fi
26- echo "FRANKENPHP_VERSION =${version}" >> "${GITHUB_ENV }"
31+ echo "version =${version}" >> "${GITHUB_OUTPUT }"
Original file line number Diff line number Diff line change @@ -453,9 +453,14 @@ jobs:
453453 ref : ${{ needs.prepare.outputs.ref }}
454454 persist-credentials : false
455455 - uses : ./.github/actions/setup-go
456- - uses : ./.github/actions/version
456+ - id : version
457+ uses : ./.github/actions/version
457458 with :
458459 ref : ${{ needs.prepare.outputs.ref }}
460+ - name : Set FRANKENPHP_VERSION
461+ run : echo "FRANKENPHP_VERSION=${VERSION}" >> "${GITHUB_ENV}"
462+ env :
463+ VERSION : ${{ steps.version.outputs.version }}
459464 - name : Build FrankenPHP
460465 run : ./build-static.sh
461466 env :
Original file line number Diff line number Diff line change 6969 path : frankenphp
7070 persist-credentials : false
7171
72- - uses : ./frankenphp/.github/actions/version
72+ - id : version
73+ uses : ./frankenphp/.github/actions/version
7374 with :
7475 ref : ${{ env.REF }}
76+ - name : Set FRANKENPHP_VERSION
77+ shell : bash
78+ run : echo "FRANKENPHP_VERSION=${VERSION}" >> "${GITHUB_ENV}"
79+ env :
80+ VERSION : ${{ steps.version.outputs.version }}
7581
7682 - name : Setup Go
7783 uses : ./frankenphp/.github/actions/setup-go
You can’t perform that action at this time.
0 commit comments