This repository has been archived by the owner on Jun 13, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
58 lines (50 loc) · 2.37 KB
/
deploy-pr.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
# v1.1
name: Deploy to environments
on:
pull_request:
paths-ignore:
- '.github/**'
- 'docs/**'
- 'build/**'
- 'README.md'
- 'LICENSE'
- '**/argoDeploy.json'
branches: [dev]
types: [labeled, closed]
jobs:
deploy:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.REPO_TOKEN }}
steps:
- name: Read deployment config
if: contains(github.event.pull_request.labels.*.name, 'deploy-demo') || contains(github.event.pull_request.labels.*.name, 'deploy-qa')
uses: VirtoCommerce/vc-github-actions/get-deploy-param@master
id: deployConfig
with:
envName: 'qa'
deployConfigPath: '.deployment/demo-storefront/argoDeploy.json'
- name: Gets artifact link
if: contains(github.event.pull_request.labels.*.name, 'deploy-demo') || contains(github.event.pull_request.labels.*.name, 'deploy-qa')
uses: VirtoCommerce/vc-github-actions/get-artifact-link@master
id: artifactLink
- name: Create deploy PR in QA
if: github.event.action != 'closed' && contains(github.event.pull_request.labels.*.name, 'deploy-qa') && !contains(github.event.pull_request.labels.*.name, 'deploy-demo')
uses: VirtoCommerce/vc-github-actions/create-deploy-pr@master
with:
deployRepo: ${{ steps.deployConfig.outputs.deployRepo }}
deployBranch: ${{ fromJSON(steps.deployConfig.outputs.deployConfig).qa.deployBranch }}
artifactKey: ${{ steps.deployConfig.outputs.artifactKey }}
artifactUrl: ${{ steps.artifactLink.outputs.artifactUrl }}
taskNumber: ${{ steps.artifactLink.outputs.qaTaskNumber }}
cmPath: ${{ steps.deployConfig.outputs.cmPath }}
# - name: Create deploy PR in Demo
# if: github.event.action == 'closed' && github.event.pull_request.merged == true && contains(github.event.pull_request.labels.*.name, 'deploy-demo')
# uses: VirtoCommerce/vc-github-actions/create-deploy-pr@master
# with:
# deployRepo: ${{ steps.deployConfig.outputs.deployRepo }}
# deployBranch: ${{ fromJSON(steps.deployConfig.outputs.deployConfig).prod.deployBranch }}
# artifactKey: ${{ steps.deployConfig.outputs.artifactKey }}
# artifactUrl: ${{ steps.artifactLink.outputs.artifactUrl }}
# taskNumber: ${{ steps.artifactLink.outputs.demoTaskNumber }}
# cmPath: ${{ steps.deployConfig.outputs.cmPath }}