Skip to content

BlueFinchCommerce/upgrade-patch-helper-github-action

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

bluefinch-upgrade-patch-helper-github-action

This GitHub action automates the running of https://github.com/AmpersandHQ/ampersand-magento2-upgrade-patch-helper

You can manually run the upgrade patch helper by following the instructions here.

Installation

In your repository create a .github/workflows/upgrade-patch-helper.yml on the default branch with the following contents

name: Upgrade Patch Helper

on:
  workflow_dispatch:
    inputs:
      branch-to-compare-from:
        description: 'The branch to compare from, without your changes'
        type: string
        required: true
      branch-to-compare-to:
        description: 'The branch to compare to, with your changes'
        type: string
        required: true
      php-version:
        description: 'The PHP version to use, eg 8.1/8.2/8.3/8.4'
        required: true
        type: string
      with-gui-artifacts:
        description: "Set this flag to upload artifacts for https://github.com/elgentos/magento2-upgrade-gui"
        type: boolean
        required: true
        default: false
      allow-composer-patch-plugins:
        description: "Allow cweagans/composer-patches and vaimo/composer-patches to run during install"
        type: boolean
        required: false
        default: false

jobs:
  upgrade-patch-helper:
    uses: bluefinchcommerce/upgrade-patch-helper-github-action/.github/workflows/upgrade-patch-helper.yml@1.0.0
    with:
      branch-to-compare-from: ${{ inputs.branch-to-compare-from }}
      branch-to-compare-to: ${{ inputs.branch-to-compare-to }}
      php-version: ${{ inputs.php-version }}
      with-gui-artifacts: ${{ inputs.with-gui-artifacts }}
      allow-composer-patch-plugins: ${{ inputs.allow-composer-patch-plugins }}
    secrets:
      composer-auth: '${{ secrets.COMPOSER_AUTH }}'

Authentication

To run the composer install commands a valid auth.json needs to be provided.

  1. Please read the official Adobe documentation detailing the usage of auth.json

  2. Follow the official GitHub documentation and add a COMPOSER_AUTH secret containing a valid auth.json

  3. This COMPOSER_AUTH secret is only ever used to create a ~/.composer/auth.json file within your GitHub action runner.

Usage

You can manually trigger executions of the patch helper by following this process.

  1. On the top of your repository click "Actions"

  2. On the left hand side below "All workflows" click "Upgrade Patch Helper"

  3. You will see the following interface, on the right hand side click "Run workflow" screenshot

  4. Fill in the requested details and click "Run workflow"

    screenshot

    Leave allow-composer-patch-plugins disabled unless the project needs Composer patch plugins to run while installing the branch being analysed. When disabled, the workflow prevents cweagans/composer-patches and vaimo/composer-patches from applying patches during the final install.

  5. The page will refresh and not show anything. Give it a few seconds then refresh the page again. You should see a running job indicated by an orange icon. Click into that job.

  6. Once the job completes you will be able to see the artifacts available for download screenshot

  7. Review each WARN entry against alongside the patch helper documentation.

About

GitHub action to run the magento2 upgrade patch helper

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors