Skip to content

Commit

Permalink
Deployment workflow PS 1.7.x
Browse files Browse the repository at this point in the history
  • Loading branch information
seiwan committed Nov 18, 2024
1 parent ea89c15 commit 8e49a36
Showing 1 changed file with 7 additions and 15 deletions.
22 changes: 7 additions & 15 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down Expand Up @@ -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

Expand All @@ -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

Expand Down

0 comments on commit 8e49a36

Please sign in to comment.