Skip to content

Commit 9ecb8ce

Browse files
tweaks gh action
1 parent 98090de commit 9ecb8ce

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

.github/workflows/update_version.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,14 @@ jobs:
2121
- name: "Update Dockerfile and action.yml"
2222
id: fetch_version
2323
run: |
24-
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))')
25-
latest=$(echo $latest | tr -d '"')
24+
latest=$(curl -s https://repo.packagist.org/p2/phparkitect/phparkitect.json | jq -r '.packages[][0] | .version')
25+
2626
echo "Latest PHPArkitect version is $latest"
27-
echo ::set-output name=latest::$latest
27+
echo "latest=$latest" >> "$GITHUB_OUTPUT"
28+
2829
sed -i -re "s/ENV VERSION=.*/ENV VERSION=$latest/" Dockerfile
2930
cat Dockerfile
31+
3032
sed -i -re "s/arkitect-github-actions:[0-9.]+/arkitect-github-actions:$latest/" action.yml
3133
cat action.yml
3234

0 commit comments

Comments
 (0)