-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (45 loc) · 1.74 KB
/
deploy-storefront.yml
File metadata and controls
53 lines (45 loc) · 1.74 KB
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
name: Cloud storefront deployment
on:
workflow_dispatch:
push:
paths:
- 'storefront/**'
branches:
- 'vcmp-*'
jobs:
gitops-publish-storefront:
runs-on: ubuntu-20.04
env:
DOCKER_LOGIN: vcmp-token
DOCKER_PASSWORD: ${{ secrets.VCMP_ACR_DOCKER_PASSWORD }}
CONTAINER_REGISTRY: virtopaasregistrymain.azurecr.io
IMAGE_REPOSITORY: virtopaasregistrymain.azurecr.io/vcmp/storefront
ARGO_TOKEN: ${{ secrets.VCMP_TOKEN }}
ARGO_APP_NAME: ${{ github.ref_name }}
steps:
- run: echo "Temporary disabled"
- uses: actions/checkout@v4
- name: Install vc-build
run: |
dotnet tool install --global VirtoCommerce.GlobalTool
- name: Get storefront version
id: platform-version
run: |
echo "STOREFRONT_TAG=$(cat ./storefront/image.json | jq -r '.Tag')" >> $GITHUB_ENV
echo "STOREFRONT_REPO=$(cat ./storefront/image.json | jq -r '.Repository')" >> $GITHUB_ENV
- name: Docker Login
uses: docker/login-action@v3
with:
registry: ${{ env.CONTAINER_REGISTRY }}
username: ${{ env.DOCKER_LOGIN }}
password: ${{ env.DOCKER_PASSWORD }}
- name: Publish platform image to the Virto Cloud
run: |
docker pull ${{ env.STOREFRONT_REPO }}:${{ env.STOREFRONT_TAG }}
docker tag ${{ env.STOREFRONT_REPO }}:${{ env.STOREFRONT_TAG }} ${{ env.IMAGE_REPOSITORY }}:${{ env.STOREFRONT_TAG }}
docker push ${{ env.IMAGE_REPOSITORY }}:${{ env.STOREFRONT_TAG }}
- name: Update app
run: |
vc-build CloudEnvSetParameter -EnvironmentName ${{ env.ARGO_APP_NAME }} -CloudToken ${{ secrets.VCMP_PLATFORM_TOKEN }} -HelmParameters storefront.image.tag=$TAG
env:
TAG: ${{ env.STOREFRONT_TAG }}