Update platform and storefront to latest version. #336
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Cloud storefront deployment | |
on: | |
workflow_dispatch: | |
push: | |
paths: | |
- 'storefront/**' | |
branches: [ virtostart ] | |
jobs: | |
gitops: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- 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 | |
run: | | |
docker login virtopaasregistrymain.azurecr.io -u virtostart -p ${{ secrets.VIRTOSTART_ACR_DOCKER_PASSWORD }} | |
docker pull $STOREFRONT_REPO:$STOREFRONT_TAG | |
docker tag $STOREFRONT_REPO:$STOREFRONT_TAG virtopaasregistrymain.azurecr.io/virtostart/storefront:$STOREFRONT_TAG | |
docker push virtopaasregistrymain.azurecr.io/virtostart/storefront:$STOREFRONT_TAG | |
- name: Update app | |
run: | | |
vc-build CloudEnvSetParameter -EnvironmentName virtostart-main -CloudToken ${{ secrets.VIRTOSTART_PLATFORM_TOKEN }} -HelmParameters storefront.image.tag=$TAG | |
env: | |
TAG: ${{ env.STOREFRONT_TAG }} |