Merge pull request #1841 from PoulainMaxime/feat/compat-v9 #519
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: CDN Publish Preproduction | |
on: | |
push: | |
branches: | |
- master | |
env: | |
WORKFLOW: googleshopping-storage.yml | |
NODE_VERSION: 20 | |
PNPM_VERSION: 8 | |
VUE_PATH: _dev | |
BUILD_PATH: views | |
jobs: | |
publish: | |
name: CDN publish | |
runs-on: ubuntu-latest | |
steps: | |
- name: Get tag | |
id: get_tag | |
run: | | |
echo TAG=$(echo $GITHUB_REF | cut -d / -f 3) >> $GITHUB_OUTPUT | |
echo MAJOR=$(echo $GITHUB_REF | cut -d / -f 3 | cut -d '.' -f 1) >> $GITHUB_OUTPUT | |
echo MINOR=$(echo $GITHUB_REF | cut -d / -f 3 | cut -d '.' -f 2) >> $GITHUB_OUTPUT | |
echo PATCH=$(echo $GITHUB_REF | cut -d / -f 3 | cut -d '.' -f 3) >> $GITHUB_OUTPUT | |
- name: Get assets URL | |
id: get_assets_url | |
run: | | |
echo URL=https://storage.googleapis.com/psxmarketing-preproduction-cdn/latest/ >> $GITHUB_OUTPUT | |
env: | |
MAJOR: ${{ steps.get_tag.outputs.MAJOR }} | |
MINOR: ${{ steps.get_tag.outputs.MINOR }} | |
PATCH: ${{ steps.get_tag.outputs.PATCH }} | |
- name: Trigger storage preproduction | |
uses: benc-uk/workflow-dispatch@v1 | |
with: | |
workflow: ${{ env.WORKFLOW }} | |
repo: PrestaShopCorp/services-deployment | |
token: ${{ secrets.ACCESS_TOKEN }} | |
ref: 'refs/heads/main' | |
inputs: '{ "version": "${{ steps.get_tag.outputs.TAG }}", "nodeVersion": "${{ env.NODE_VERSION }}", "pnpmVersion": "${{ env.PNPM_VERSION }}", "vuejsPath": "${{ env.VUE_PATH }}", "vuejsBuildPath": "${{ env.BUILD_PATH }}", "isRelease": "false", "environment": "preproduction", "assetsUrl": "${{ steps.get_assets_url.outputs.URL }}" }' | |