diff --git a/.github/workflows/build-prestashop.yml b/.github/workflows/build-prestashop.yml index e8054b4..6f44550 100644 --- a/.github/workflows/build-prestashop.yml +++ b/.github/workflows/build-prestashop.yml @@ -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 @@ -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