-
Notifications
You must be signed in to change notification settings - Fork 13
87 lines (83 loc) · 2.85 KB
/
build-mageos-release.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
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 }}