forked from mage-os/github-actions
-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
31 lines (27 loc) · 908 Bytes
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
name: "Get Magento Version"
author: "Graycore"
description: " A Github Action that determines the currently installed version of Magento"
inputs:
working-directory:
default: $GITHUB_WORKSPACE
description: "The current working directory of the action"
required: false
outputs:
version: # id of output
description: 'The determined version of Magento'
value: ${{ steps.get-magento-version.outputs.version }}
runs:
using: "composite"
steps:
- run: |
echo "version=$(cat composer.json | jq '.require
| with_entries( select(.key == "magento/product-community-edition" or .key == "magento/product-enterprise-edition") )
| to_entries
| .[0].value')" >> $GITHUB_OUTPUT
shell: bash
working-directory: ${{ inputs.working-directory }}
name: Compute Installed Magento version
id: get-magento-version
branding:
icon: "code"
color: "green"