forked from PrestaShop/docker
-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (49 loc) · 1.71 KB
/
pull-request.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: Pull Request
on:
pull_request:
types: [opened, reopened, synchronize]
env:
TARGET_PLATFORM: "linux/amd64" # TODO: 'linux/amd64,linux/arm64,linux/arm' ? 32 bits ?
jobs:
lint_shell:
name: "Lint: shell"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run ShellCheck
uses: ludeeus/action-shellcheck@master
with:
ignore_paths: ./assets/docker_run.sh
lint_dockerfile:
name: "Lint: dockerfile"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: hadolint/[email protected]
with:
recursive: true
dockerfile: "*.Dockerfile"
docker_build:
name: "Docker build: ${{ matrix.os_flavour }} for ${{ matrix.ps_version }} with ${{ matrix.server_flavour }}"
runs-on: ubuntu-latest
strategy:
fail-fast: false # TODO: Test only should be removed
matrix:
os_flavour: ["alpine", "debian"]
ps_version: ["1.6.1.24", "1.7.8.10", "8.1.5"]
server_flavour: ["fpm", "nginx", "apache"]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Call the docker build chain
run: ./build.sh
env:
OS_FLAVOUR: ${{ matrix.os_flavour }}
PS_VERSION: ${{ matrix.ps_version }}
SERVER_FLAVOUR: ${{ matrix.server_flavour }}
TARGET_PLATFORM: ${{ env.TARGET_PLATFORM }}
- name: Test the image
run: docker run --env PS_DOMAIN='localhost:80' $DOCKER_IMAGE cat VERSION
# run: docker run --env PS_DOMAIN='localhost:80' --entrypoint cat $DOCKER_IMAGE cat VERSION
env:
DOCKER_IMAGE: prestashop/prestashop:${{ matrix.ps_version }}-${{ matrix.os_flavour }}