-
Notifications
You must be signed in to change notification settings - Fork 4
37 lines (31 loc) · 1013 Bytes
/
deploy-theme.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
name: Cloud theme deployment
on:
workflow_dispatch:
push:
paths:
- 'theme/**'
branches:
- 'vcst-*'
jobs:
gitops:
strategy:
matrix:
store: [B2B-store]
runs-on: ubuntu-latest
env:
ARGO_APP_NAME: ${{ github.ref_name }}
ARTIFACT_URL: ''
steps:
- uses: actions/checkout@v4
- name: Install vc-build
run: |
dotnet tool install --global VirtoCommerce.GlobalTool
- name: Get theme version
id: theme-version
run: |
echo "ARTIFACT_URL=$(cat ./theme/artifact.json | jq -r '.URL')" >> $GITHUB_ENV
- name: Update environment
run: |
export PARAMETER_NAME=$(echo "themes.${{ matrix.store }}" | xargs)
export PARAMETER_VALUE=$(echo "${{ env.ARTIFACT_URL }}" | xargs)
vc-build CloudEnvSetParameter -EnvironmentName ${{ env.ARGO_APP_NAME }} -CloudToken ${{ secrets.VCST_PLATFORM_TOKEN }} -HelmParameters $PARAMETER_NAME=$PARAMETER_VALUE