Skip to content

Storefront version UP VCST-473 #321

Storefront version UP VCST-473

Storefront version UP VCST-473 #321

name: Cloud storefront deployment
on:
workflow_dispatch:
push:
paths:
- 'storefront/**'
branches:
- 'vcptcore-*'
jobs:
gitops-publish-storefront:
runs-on: ubuntu-20.04
env:
DOCKER_LOGIN: vcptcore-token
DOCKER_PASSWORD: ${{ secrets.VCPTCORE_ACR_DOCKER_PASSWORD }}
CONTAINER_REGISTRY: virtopaasregistrymain.azurecr.io
IMAGE_REPOSITORY: virtopaasregistrymain.azurecr.io/vcptcore/storefront
ARGO_APP_NAME: ${{ github.ref_name }}
steps:
- 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.VCPTCORE_PLATFORM_TOKEN }} -HelmParameters storefront.image.tag=$TAG
env:
TAG: ${{ env.STOREFRONT_TAG }}