Skip to content

Docker image publish #5

Docker image publish

Docker image publish #5

name: Docker image publish
on:
push:
tags: ["v*.*.*"]
workflow_dispatch:
inputs:
# flavour:
# description: 'PrestaShop flavour'
# required: true
# default: 'alpine'
# type: choice
# options:
# - debian
# - alpine
# server:
# description: 'PrestaShop server'
# required: true
# default: 'nginx'
# type: choice
# options:
# - nginx
# - apache
ps_version:
description: "The target PrestaShop version"
required: true
type: string
php_version:
description: "The target PHP version"
required: false
type: string
tag:
description: "Docker tag"
required: true
type: string
target_platforms:
description: "Target platforms to build this image for"
required: false
default: "linux/amd64,linux/arm64,linux/arm"
type: string
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
with:
platforms: "arm64"
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
platforms: ${{ env.TARGET_PLATFORMS }}
use: true
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
run: |
PLATFORM=${{ inputs.target_platforms }} \
PS_VERSION=${{ inputs.ps_version }} \
PHP_VERSION=${{ inputs.php_version }} \
PUSH=true \
DOCKER_IMAGE=prestashop/prestashop-flashlight:${{ inputs.tag }} \
./build.sh