-
Notifications
You must be signed in to change notification settings - Fork 12
45 lines (39 loc) · 1.6 KB
/
cdn-preproduction.yml
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
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 }}" }'