mirror of
https://github.com/graycoreio/github-actions-magento2.git
synced 2026-06-08 19:46:41 +00:00
49 lines
1.8 KiB
YAML
49 lines
1.8 KiB
YAML
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: graycoreio/github-actions-magento2/get-magento-version@v8.4.0
|
|
id: init-magento-get-magento-version
|
|
with:
|
|
working-directory: ${{ inputs.magento_directory }}
|
|
|
|
- run: echo "version=$(composer --version | awk '{print $3}')" >> $GITHUB_OUTPUT
|
|
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"
|