From 9ecb8ce79ea1583bc593cb2faa8c938a30b0793d Mon Sep 17 00:00:00 2001 From: Michele Orselli Date: Thu, 13 Mar 2025 23:36:42 +0100 Subject: [PATCH] tweaks gh action --- .github/workflows/update_version.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/update_version.yml b/.github/workflows/update_version.yml index 9d1ed9b..e431762 100644 --- a/.github/workflows/update_version.yml +++ b/.github/workflows/update_version.yml @@ -21,12 +21,14 @@ jobs: - name: "Update Dockerfile and action.yml" id: fetch_version run: | - latest=$(curl -s https://packagist.org/packages/phparkitect/phparkitect.json|jq '[.package.versions[]|select(.version|test("^\\d+\\.\\d+\\.\\d+$"))|.version]|max_by(.|[splits("[.]")]|map(tonumber))') - latest=$(echo $latest | tr -d '"') + latest=$(curl -s https://repo.packagist.org/p2/phparkitect/phparkitect.json | jq -r '.packages[][0] | .version') + echo "Latest PHPArkitect version is $latest" - echo ::set-output name=latest::$latest + echo "latest=$latest" >> "$GITHUB_OUTPUT" + sed -i -re "s/ENV VERSION=.*/ENV VERSION=$latest/" Dockerfile cat Dockerfile + sed -i -re "s/arkitect-github-actions:[0-9.]+/arkitect-github-actions:$latest/" action.yml cat action.yml