forked from mage-os/github-actions
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yml
48 lines (42 loc) · 1.82 KB
/
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: "Fix Magento Install"
author: "Graycore"
description: "A Github Action that fixes Magento before `composer install`"
inputs:
magento_directory:
required: true
description: "The folder where Magento is installed"
runs:
using: "composite"
steps:
- uses: mage-os/github-actions/get-magento-version@main
id: init-magento-get-magento-version
with:
working-directory: ${{ inputs.magento_directory }}
- run: echo "::set-output name=version::$(composer --version | awk '{print $3}')"
shell: bash
name: Compute Composer Version
id: init-magento-get-composer-version
- run: composer require monolog/monolog:"<2.7.0" --no-update
shell: bash
name: Fixup Monolog (https://github.com/magento/magento2/pull/35596)
working-directory: ${{ inputs.magento_directory }}
if: |
steps.init-magento-get-magento-version.outputs.version == '"2.4.4"'
- run: composer require "dotmailer/dotmailer-magento2-extension-package:4.6.0-p2 as 4.6.0" --no-update
shell: bash
name: Fixup Dotmailer (https://devdocs.magento.com/guides/v2.4/release-notes/release-notes-2-4-0-commerce.html#dotdigital-1)
working-directory: ${{ inputs.magento_directory }}
if: |
steps.init-magento-get-magento-version.outputs.version == '"2.4.0"'
- run: |
composer config --no-interaction allow-plugins.dealerdirect/phpcodesniffer-composer-installer true
composer config --no-interaction allow-plugins.laminas/laminas-dependency-plugin true
composer config --no-interaction allow-plugins.magento/* true
name: Fixup Composer Plugins
shell: bash
working-directory: ${{ inputs.magento_directory }}
if: |
!startsWith(steps.init-magento-get-composer-version.outputs.version, 1)
branding:
icon: "code"
color: "green"