From 8e49a368d10c725f33672114425b024da515dfd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20BIDAULT?= Date: Mon, 18 Nov 2024 16:56:20 +0100 Subject: [PATCH] Deployment workflow PS 1.7.x --- .github/workflows/deploy.yml | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index b8d461a62..4e39c901a 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -21,25 +21,17 @@ jobs: triggered: ${{ contains(github.event.pull_request.labels.*.name, 'integration deployment') }} - lower: preproduction triggered: ${{ contains(github.event.pull_request.labels.*.name, 'preproduction deployment') }} - - lower: production - triggered: ${{ github.event_name == 'push' }} outputs: - name: ${{ steps.zip-name.outputs.zip_name }} + integration: ${{ steps.zip-name.outputs.integration }} + preproduction: ${{ steps.zip-name.outputs.preproduction }} + production: ps_checkout.zip steps: - name: Generate zip file name id: zip-name - if: matrix.env.triggered == true run: | - zip_name=$REPOSITORY - test_name='' - - if [ $ENV != 'production' ]; then - date=$(date -d '+2 hours' +'%Y-%m-%d_%H-%M-%S') - test_name=-$PS_VERSION-$ENV-$PR_NUMBER-$date - fi - - echo "zip_name=$zip_name$test_name.zip" >> "$GITHUB_OUTPUT" + date=$(date -d '+2 hours' +'%Y-%m-%d_%H-%M-%S') + echo "$ENV=$REPOSITORY-$PS_VERSION-$ENV-$PR_NUMBER-$date.zip" >> "$GITHUB_OUTPUT" env: ENV: ${{ matrix.env.lower }} REPOSITORY: ${{ github.event.repository.name }} @@ -67,7 +59,7 @@ jobs: env-upper: ${{ matrix.env.upper }} env-lower: ${{ matrix.env.lower }} triggered: ${{ matrix.env.triggered }} - zip-name: ${{ needs.zip-name-matrix.outputs.name }} + zip-name: ${{ needs.zip-name-matrix.outputs[matrix.env.lower] }} repository-name: ${{ github.event.repository.name }} secrets: inherit @@ -92,7 +84,7 @@ jobs: env-upper: ${{ matrix.env.upper }} env-lower: ${{ matrix.env.lower }} triggered: ${{ matrix.env.triggered }} - zip-name: ${{ needs.zip-name-matrix.outputs.name }} + zip-name: ${{ needs.zip-name-matrix.outputs[matrix.env.lower] }} prestashop-version: ps7 secrets: inherit