v1.74.8 #471
Workflow file for this run
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 | |
on: | |
release: | |
types: [prereleased, released] | |
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: | | |
if [[ "${{ github.event.release.prerelease }}" == "true" ]]; then | |
echo URL=https://storage.googleapis.com/psxmarketing-cdn/${MAJOR}.${MINOR}.${PATCH}/ >> $GITHUB_OUTPUT | |
else | |
echo URL=https://storage.googleapis.com/psxmarketing-cdn/${MAJOR}.x.x/ >> $GITHUB_OUTPUT | |
fi | |
env: | |
MAJOR: ${{ steps.get_tag.outputs.MAJOR }} | |
MINOR: ${{ steps.get_tag.outputs.MINOR }} | |
PATCH: ${{ steps.get_tag.outputs.PATCH }} | |
- name: Trigger storage production | |
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": "${{ !github.event.release.prerelease && true || false }}" , "assetsUrl": "${{ steps.get_assets_url.outputs.URL }}" }' |