Build, deploy & check Release #52
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build, deploy & check Release | |
on: | |
workflow_dispatch: | |
inputs: | |
repo: | |
description: 'The composer repository url' | |
required: true | |
default: 'https://preview-repo.mage-os.org/' | |
type: choice | |
options: | |
- https://preview-repo.mage-os.org/ | |
- https://repo.mage-os.org/ | |
remote_dir: | |
description: 'The deploy target directory on the repo host' | |
required: true | |
default: '/var/www/preview-repo.mage-os.org/html/' | |
type: choice | |
options: | |
- /var/www/preview-repo.mage-os.org/html/ | |
- /var/www/repo.mage-os.org/html/ | |
mageos_release: | |
description: 'New Mage-OS version (e.g. 1.0.0)' | |
required: false | |
default: '' | |
type: string | |
upstream_release: | |
description: 'Closest Magento Open Source version for new release (e.g. 2.4.6-p2)' | |
required: false | |
default: '' | |
type: string | |
publish_tag: | |
description: 'Push new release tag to repos' | |
required: false | |
default: false | |
type: boolean | |
jobs: | |
deploy: | |
uses: ./.github/workflows/deploy.yml | |
name: "generate & deploy" | |
if: contains('["vinai","mage-os-ci"]', github.actor) | |
with: | |
repo: ${{ inputs.repo }} | |
remote_dir: ${{ inputs.remote_dir }} | |
entrypoint: src/make/mageos-release.js | |
delete: false | |
mageos_release: ${{ inputs.mageos_release }} | |
upstream_release: ${{ inputs.upstream_release }} | |
publish_tag: ${{ inputs.publish_tag }} | |
secrets: | |
SERVER_SSH_KEY: ${{ secrets.SERVER_SSH_KEY }} | |
REMOTE_USER: ${{ secrets.REMOTE_USER }} | |
compute-release-service-versions: | |
runs-on: ubuntu-latest | |
outputs: | |
matrix: ${{ steps.supported-version.outputs.matrix }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: mage-os/github-actions/supported-version@main | |
with: | |
project: 'mage-os' | |
kind: 'all' | |
id: supported-version | |
integration-check: | |
name: "installation check" | |
needs: [ deploy, compute-release-service-versions ] | |
uses: mage-os/github-actions/.github/workflows/integration.yaml@main | |
with: | |
package_name: mage-os/demo-package | |
use_local_source: false | |
matrix: ${{ needs.compute-release-service-versions.outputs.matrix }} | |
test_command: ../../../vendor/bin/phpunit ../../../vendor/mage-os/demo-package/Test/Integration | |
fail-fast: false | |
magento_repository: ${{ inputs.repo }} | |
composer_cache_key: ${{ inputs.composer_cache_key || 'v1' }} | |
publish-release-tag: | |
name: "Publish release tag" | |
if: ${{ success() && inputs.mageos_release && inputs.publish_tag }} | |
needs: [ deploy, integration-check ] | |
uses: ./.github/workflows/push-release-tag.yml | |
with: | |
mageos_release: ${{ inputs.mageos_release }} | |
secrets: | |
MAGE_OS_CI_TOKEN: ${{ secrets.MAGE_OS_CI_TOKEN }} |