This repository demonstrates how to integrate mage-remote-run into a CI/CD pipeline using GitHub Actions. It showcases the simplicity of setting up and using the tool to interact with Magento/Adobe Commerce instances remotely during your automated workflows.
- Easy Integration: Uses the setup-mage-remote-run action from the GitHub Marketplace.
- Automated Configuration: Shows how to securely configure connection profiles using GitHub Secrets, specifically for OAuth 1.0a authentication.
- Verification: Includes steps to verify the connection and execute commands against a remote instance.
The core of this example is the GitHub Action workflow defined in .github/workflows/demo.yml.
The workflow utilizes the muench-dev/mage-remote-run-action to setup the environment. Here is a simplified overview of the process:
- Checkout Code: Standard checkout step.
- Setup Node.js: Ensures the environment is ready.
- Configure Mage Remote Run: Uses the action to install and configure the tool with provided credentials.
- Execute Commands: Runs standard
mage-remote-runcommands (e.g., listing websites, store groups).
- name: Configure Mage Remote Run
uses: muench-dev/mage-remote-run-action@main
with:
profile-name: "PaaS-Instance"
type: "ac-cloud-paas"
url: ${{ secrets.MAGE_URL }}
consumer-key: ${{ secrets.MAGE_CONSUMER_KEY }}
consumer-secret: ${{ secrets.MAGE_CONSUMER_SECRET }}
access-token: ${{ secrets.MAGE_ACCESS_TOKEN }}
token-secret: ${{ secrets.MAGE_ACCESS_TOKEN_SECRET }}
- name: List Websites
run: mage-remote-run website list --format jsonTo use this in your own repository:
- Add the
muench-dev/mage-remote-run-actionstep to your workflow. - Configure the necessary GitHub Secrets for your Magento / Mage-OS / Adobe Commerce instance:
MAGE_URLMAGE_CONSUMER_KEYMAGE_CONSUMER_SECRETMAGE_ACCESS_TOKENMAGE_ACCESS_TOKEN_SECRET
For more details on the action, visit the GitHub Marketplace.