Skip to content

Commit

Permalink
build(prestashop): build ps 7 and 8 separately
Browse files Browse the repository at this point in the history
  • Loading branch information
EdieLemoine committed Sep 29, 2023
1 parent 06b9abf commit 4326e82
Showing 1 changed file with 36 additions and 5 deletions.
41 changes: 36 additions & 5 deletions .github/workflows/build-prestashop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ jobs:
prepare:
runs-on: ubuntu-22.04
outputs:
ps-matrix: ${{ steps.ps.outputs.matrix }}
ps7-matrix: ${{ steps.ps.outputs.ps7-matrix }}
ps8-matrix: ${{ steps.ps.outputs.ps8-matrix }}
steps:
- name: 'Get all PrestaShop versions as json array'
id: ps
Expand All @@ -31,16 +32,46 @@ jobs:
result=$(curl -s https://api.github.com/repos/PrestaShop/PrestaShop/tags)
versions=$(echo "$result" | jq -c '.[].name' | grep -v -E 'beta|rc|alpha|dev' | jq -sc 'unique | reverse')
echo "matrix=$versions" >> $GITHUB_OUTPUT
ps7_versions=$(echo "$versions" | jq -c 'map(select(. | startswith("1.7")))')
ps8_versions=$(echo "$versions" | jq -c 'map(select(. | startswith("8")))')
echo "ps7-matrix=$ps7_versions" >> $GITHUB_OUTPUT
echo "ps8-matrix=$ps8_versions" >> $GITHUB_OUTPUT
build:
build-ps7:
runs-on: ubuntu-22.04
needs: prepare
strategy:
fail-fast: false
matrix:
php: [ '8.2', '8.1', '8.0', '7.4', '7.3', '7.2', '7.1' ]
ps: ${{ fromJson(needs.prepare.outputs.ps-matrix) }}
php: [ '7.4', '7.3', '7.2', '7.1' ]
ps: ${{ fromJson(needs.prepare.outputs.ps7-matrix) }}
steps:
- uses: actions/checkout@v3

- uses: ./.github/actions/login-ghcr
with:
token: ${{ secrets.GITHUB_TOKEN }}

- uses: ./.github/actions/build-push
with:
registry: ghcr.io
cache-mode: 'min'
context: images/prestashop
image: myparcelnl/prestashop
suffix: ${{ matrix.ps }}-php${{ matrix.php }}
build-args: |
PHP_VERSION=${{ matrix.php }}
PS_VERSION=${{ matrix.ps }}
build-ps8:
runs-on: ubuntu-22.04
needs: prepare
strategy:
fail-fast: false
matrix:
php: [ '8.2', '8.1', '8.0' ]
ps: ${{ fromJson(needs.prepare.outputs.ps8-matrix) }}
steps:
- uses: actions/checkout@v3

Expand Down

0 comments on commit 4326e82

Please sign in to comment.