-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
108 lines (87 loc) · 1.7 KB
/
.gitlab-ci.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
stages:
- build
- deploy
variables:
DEFAULT_VERSION: "8.4"
.deploy_job: &deploy_job
stage: deploy
image: docker:latest
services:
- docker:dind
before_script:
- docker login --username $DOCKER_HUB_USERNAME --password $DOCKER_HUB_PASSWORD
script:
- sed -i -e "s/$DEFAULT_VERSION/$VERSION/g" Dockerfile
- docker build -t nexendrie/php:$VERSION .
- docker push nexendrie/php:$VERSION
only:
- master@nexendrie/docker-php
.build_job: &build_job
stage: build
image: docker:latest
services:
- docker:dind
script:
- sed -i -e "s/$DEFAULT_VERSION/$VERSION/g" Dockerfile
- docker build .
except:
- master@nexendrie/docker-php
deploy:php8.1:
<<: *deploy_job
variables:
VERSION: "8.1"
build:php8.1:
<<: *build_job
variables:
VERSION: "8.1"
deploy:php8.2:
<<: *deploy_job
variables:
VERSION: "8.2"
build:php8.2:
<<: *build_job
variables:
VERSION: "8.2"
deploy:php8.3:
<<: *deploy_job
variables:
VERSION: "8.3"
build:php8.3:
<<: *build_job
variables:
VERSION: "8.3"
deploy:php8.4:
environment:
name: dockerhub
url: https://hub.docker.com/r/nexendrie/php/
after_script:
- docker build -t nexendrie/php:latest .
- docker push nexendrie/php:latest
<<: *deploy_job
variables:
VERSION: "8.4"
build:php8.4:
<<: *build_job
variables:
VERSION: "8.4"
pages:
stage: deploy
image: nexendrie/php:8.3
environment:
name: pages
url: https://nexendrie.gitlab.io/docker-php
script:
- phing generate
cache:
paths:
- vendor/
artifacts:
paths:
- public
only:
refs:
- master@nexendrie/docker-php
changes:
- composer.lock
- index.*
- CONTRIBUTING.md