Merge pull request #3 from provokateurin/feat/php-version-ids

feat: Expose PHP version IDs
This commit is contained in:
Robin Appelman 2026-02-17 15:37:55 +01:00 committed by GitHub
commit 8a7bac6300
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 30 additions and 0 deletions

15
dist/index.js vendored
View file

@ -42616,6 +42616,19 @@ function copy(obj) {
return res;
}
// Formatted according to PHP_VERSION_ID
function getPHPVersionID(version) {
const parts = version.split('.');
let value = parseInt(parts[0]) * 10000;
if (parts.length > 1) {
value += parseInt(parts[1]) * 100;
}
if (parts.length > 2) {
value += parseInt(parts[2]);
}
return value.toString();
}
(async () => {
try {
@ -42745,7 +42758,9 @@ function copy(obj) {
core.setOutput("branches-max-list", JSON.stringify([branches[branches.length - 1]]));
core.setOutput("php-min", php[0]);
core.setOutput("php-min-id", getPHPVersionID(php[0]));
core.setOutput("php-max", php[php.length - 1]);
core.setOutput("php-max-id", getPHPVersionID(php[php.length - 1]));
core.setOutput("php-available", availablePhp);
core.setOutput("branches-min", branches[0]);
core.setOutput("branches-max", branches[branches.length - 1]);

View file

@ -102,6 +102,19 @@ function copy(obj) {
return res;
}
// Formatted according to PHP_VERSION_ID
function getPHPVersionID(version) {
const parts = version.split('.');
let value = parseInt(parts[0]) * 10000;
if (parts.length > 1) {
value += parseInt(parts[1]) * 100;
}
if (parts.length > 2) {
value += parseInt(parts[2]);
}
return value.toString();
}
(async () => {
try {
@ -231,7 +244,9 @@ function copy(obj) {
core.setOutput("branches-max-list", JSON.stringify([branches[branches.length - 1]]));
core.setOutput("php-min", php[0]);
core.setOutput("php-min-id", getPHPVersionID(php[0]));
core.setOutput("php-max", php[php.length - 1]);
core.setOutput("php-max-id", getPHPVersionID(php[php.length - 1]));
core.setOutput("php-available", availablePhp);
core.setOutput("branches-min", branches[0]);
core.setOutput("branches-max", branches[branches.length - 1]);