fix(prestashop): fix themes not building in 1.7 #7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 'Build prestashop images' | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- images/prestashop/**/* | |
workflow_dispatch: | |
permissions: | |
contents: read | |
packages: write | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
jobs: | |
prepare: | |
runs-on: ubuntu-22.04 | |
outputs: | |
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 | |
#language=bash | |
run: | | |
# PrestaShop versions without beta, rc, etc. | |
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') | |
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-ps7: | |
runs-on: ubuntu-22.04 | |
needs: prepare | |
strategy: | |
fail-fast: false | |
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 | |
- 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 }} |