Skip to content

Commit 78d39e5

Browse files
authored
Merge pull request #131 from devilbox/release-0.92
Release 0.92
2 parents 83f5743 + 6b666d0 commit 78d39e5

56 files changed

Lines changed: 508 additions & 28 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/linting.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
### Lints all generic and json files in the whole git repository
55
###
66

7-
name: linting
7+
name: Linting
88
on:
99
pull_request:
1010

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# -------------------------------------------------------------------------------------------------
44
# Job Name
55
# -------------------------------------------------------------------------------------------------
6-
name: PHP
6+
name: PHP-CI
77

88

99
# -------------------------------------------------------------------------------------------------
@@ -20,10 +20,6 @@ on:
2020
tags:
2121
- '[0-9]+.[0-9]+*'
2222

23-
# Runs daily
24-
schedule:
25-
- cron: '0 0 * * *'
26-
2723

2824
# -------------------------------------------------------------------------------------------------
2925
# What to run

.github/workflows/php-nightly.yml

Lines changed: 328 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,328 @@
1+
---
2+
3+
# -------------------------------------------------------------------------------------------------
4+
# Job Name
5+
# -------------------------------------------------------------------------------------------------
6+
name: PHP-Nightly
7+
8+
9+
# -------------------------------------------------------------------------------------------------
10+
# When to run
11+
# -------------------------------------------------------------------------------------------------
12+
on:
13+
# Runs daily
14+
schedule:
15+
- cron: '0 0 * * *'
16+
17+
18+
19+
# -------------------------------------------------------------------------------------------------
20+
# What to run
21+
# -------------------------------------------------------------------------------------------------
22+
jobs:
23+
diagnostics:
24+
name: Diagnostics
25+
runs-on: ubuntu-latest
26+
strategy:
27+
fail-fast: False
28+
steps:
29+
- name: Checkout repository
30+
uses: actions/checkout@v1
31+
32+
- name: Show environment
33+
run: |
34+
env
35+
36+
# https://help.github.com/en/github/automating-your-workflow-with-github-actions/contexts-and-expression-syntax-for-github-actions#github-context
37+
- name: Show GitHub variables
38+
run: |
39+
echo "github.actor: ${{ github.actor }}"
40+
echo "github.ref: ${{ github.ref }}"
41+
echo "github.base_ref: ${{ github.base_ref }}"
42+
echo "github.head_ref: ${{ github.head_ref }}"
43+
echo "github.event: ${{ github.event }}"
44+
echo "github.event_name: ${{ github.event_name }}"
45+
echo "github.event.pull_request.base.repo.id: ${{ github.event.pull_request.base.repo.id }}"
46+
echo "github.event.pull_request.head.repo.id: ${{ github.event.pull_request.head.repo.id }}"
47+
48+
- name: Dump GitHub context
49+
env:
50+
GITHUB_CONTEXT: ${{ toJson(github) }}
51+
run: echo "${GITHUB_CONTEXT}"
52+
53+
- name: Dump Runner context
54+
env:
55+
RUNNER_CONTEXT: ${{ toJson(runner) }}
56+
run: echo "${RUNNER_CONTEXT}"
57+
58+
59+
build:
60+
name: "[ ${{ matrix.version }} ]"
61+
runs-on: ubuntu-latest
62+
strategy:
63+
fail-fast: False
64+
matrix:
65+
# Adding all targets and only run them if they exist.
66+
# Prevents us from forgetting to update this in case
67+
# we add new envs in terragrunt.
68+
version:
69+
- '5.2'
70+
- '5.3'
71+
- '5.4'
72+
- '5.5'
73+
- '5.6'
74+
- '7.0'
75+
- '7.1'
76+
- '7.2'
77+
- '7.3'
78+
- '7.4'
79+
- '8.0'
80+
steps:
81+
82+
# ------------------------------------------------------------
83+
# Checkout repository
84+
# ------------------------------------------------------------
85+
- name: Checkout repository
86+
uses: actions/checkout@v1
87+
88+
- name: Set variables
89+
id: vars
90+
run: |
91+
# Set git branch or git tag as slug
92+
if [[ ${GITHUB_REF} =~ ^refs\/tags\/ ]]; then
93+
GIT_TYPE=TAG
94+
GIT_SLUG="${GITHUB_REF/refs\/tags\//}"
95+
else
96+
GIT_TYPE=BRANCH
97+
if [ -n "${GITHUB_HEAD_REF}" ]; then
98+
GIT_SLUG="${GITHUB_HEAD_REF}"
99+
else
100+
GIT_SLUG="${GITHUB_REF/refs\/heads\//}"
101+
fi
102+
fi
103+
104+
# Export variable
105+
# # https://help.github.com/en/actions/automating-your-workflow-with-github-actions/development-tools-for-github-actions#set-an-environment-variable-set-env
106+
echo ::set-env name=GIT_TYPE::${GIT_TYPE}
107+
echo ::set-env name=GIT_SLUG::${GIT_SLUG}
108+
109+
110+
# ------------------------------------------------------------
111+
# Base
112+
# ------------------------------------------------------------
113+
- name: Build Base
114+
run: |
115+
retry() {
116+
for ((n=0; n<${RETRIES}; n++)); do
117+
echo "[${n}] ${*}";
118+
if eval "${*}"; then
119+
return 0;
120+
fi;
121+
sleep 10;
122+
done;
123+
return 1;
124+
}
125+
retry make build-base VERSION=${VERSION}
126+
env:
127+
VERSION: ${{ matrix.version }}
128+
RETRIES: 5
129+
130+
- name: Test Base
131+
run: |
132+
retry() {
133+
for ((n=0; n<${RETRIES}; n++)); do
134+
echo "[${n}] ${*}";
135+
if eval "${*}"; then
136+
return 0;
137+
fi;
138+
sleep 10;
139+
done;
140+
return 1;
141+
}
142+
retry make test-base VERSION=${VERSION}
143+
env:
144+
VERSION: ${{ matrix.version }}
145+
RETRIES: 5
146+
147+
148+
# ------------------------------------------------------------
149+
# Mods
150+
# ------------------------------------------------------------
151+
- name: Build Mods
152+
run: |
153+
retry() {
154+
for ((n=0; n<${RETRIES}; n++)); do
155+
echo "[${n}] ${*}";
156+
if eval "${*}"; then
157+
return 0;
158+
fi;
159+
sleep 10;
160+
done;
161+
return 1;
162+
}
163+
retry make build-mods VERSION=${VERSION}
164+
env:
165+
VERSION: ${{ matrix.version }}
166+
RETRIES: 5
167+
168+
- name: Test Mods
169+
run: |
170+
retry() {
171+
for ((n=0; n<${RETRIES}; n++)); do
172+
echo "[${n}] ${*}";
173+
if eval "${*}"; then
174+
return 0;
175+
fi;
176+
sleep 10;
177+
done;
178+
return 1;
179+
}
180+
retry make test-mods VERSION=${VERSION}
181+
env:
182+
VERSION: ${{ matrix.version }}
183+
RETRIES: 5
184+
185+
186+
# ------------------------------------------------------------
187+
# Prod
188+
# ------------------------------------------------------------
189+
- name: Build Prod
190+
run: |
191+
retry() {
192+
for ((n=0; n<${RETRIES}; n++)); do
193+
echo "[${n}] ${*}";
194+
if eval "${*}"; then
195+
return 0;
196+
fi;
197+
sleep 10;
198+
done;
199+
return 1;
200+
}
201+
retry make build-prod VERSION=${VERSION}
202+
env:
203+
VERSION: ${{ matrix.version }}
204+
RETRIES: 5
205+
206+
- name: Test Prod
207+
run: |
208+
retry() {
209+
for ((n=0; n<${RETRIES}; n++)); do
210+
echo "[${n}] ${*}";
211+
if eval "${*}"; then
212+
return 0;
213+
fi;
214+
sleep 10;
215+
done;
216+
return 1;
217+
}
218+
retry make test-prod VERSION=${VERSION}
219+
env:
220+
VERSION: ${{ matrix.version }}
221+
RETRIES: 5
222+
223+
224+
# ------------------------------------------------------------
225+
# Work
226+
# ------------------------------------------------------------
227+
- name: Build Work
228+
run: |
229+
retry() {
230+
for ((n=0; n<${RETRIES}; n++)); do
231+
echo "[${n}] ${*}";
232+
if eval "${*}"; then
233+
return 0;
234+
fi;
235+
sleep 10;
236+
done;
237+
return 1;
238+
}
239+
retry make build-work VERSION=${VERSION}
240+
env:
241+
VERSION: ${{ matrix.version }}
242+
RETRIES: 5
243+
244+
- name: Test Work
245+
run: |
246+
retry() {
247+
for ((n=0; n<${RETRIES}; n++)); do
248+
echo "[${n}] ${*}";
249+
if eval "${*}"; then
250+
return 0;
251+
fi;
252+
sleep 10;
253+
done;
254+
return 1;
255+
}
256+
retry make test-work VERSION=${VERSION}
257+
env:
258+
VERSION: ${{ matrix.version }}
259+
RETRIES: 5
260+
261+
262+
# ------------------------------------------------------------
263+
# Diff README.md
264+
# ------------------------------------------------------------
265+
- name: Diff README.md
266+
run: |
267+
make gen-readme VERSION=${VERSION}
268+
git diff --quiet || { echo "Build Changes"; git diff; git status; false; }
269+
env:
270+
VERSION: ${{ matrix.version }}
271+
272+
273+
# ------------------------------------------------------------
274+
# Push build artifacts
275+
# ------------------------------------------------------------
276+
277+
# Only run this, if the PR was created by the repo owner
278+
- name: Publish images (only repo owner)
279+
run: |
280+
retry() {
281+
for ((n=0; n<${RETRIES}; n++)); do
282+
echo "[${n}] ${*}";
283+
if eval "${*}"; then
284+
return 0;
285+
fi;
286+
sleep 10;
287+
done;
288+
return 1;
289+
}
290+
291+
# Info output
292+
echo "Git Type: ${GIT_TYPE}"
293+
echo "Git Slug: ${GIT_SLUG}"
294+
295+
# Login
296+
echo "retry make login USER= PASS="
297+
298+
# Push
299+
if [ "${GIT_TYPE}" = "TAG" ]; then
300+
echo "retry make push-base VERSION=${VERSION}-${GIT_SLUG}"
301+
echo "retry make push-mods VERSION=${VERSION}-${GIT_SLUG}"
302+
echo "retry make push-prod VERSION=${VERSION}-${GIT_SLUG}"
303+
echo "retry make push-work VERSION=${VERSION}-${GIT_SLUG}"
304+
else
305+
if [ "${GIT_SLUG}" = "master" ]; then
306+
echo "retry make push-base VERSION=${VERSION}"
307+
echo "retry make push-mods VERSION=${VERSION}"
308+
echo "retry make push-prod VERSION=${VERSION}"
309+
echo "retry make push-work VERSION=${VERSION}"
310+
else
311+
echo "retry make push-base VERSION=${VERSION}-${GIT_SLUG}"
312+
echo "retry make push-mods VERSION=${VERSION}-${GIT_SLUG}"
313+
echo "retry make push-prod VERSION=${VERSION}-${GIT_SLUG}"
314+
echo "retry make push-work VERSION=${VERSION}-${GIT_SLUG}"
315+
fi
316+
fi
317+
env:
318+
VERSION: ${{ matrix.version }}
319+
RETRIES: 5
320+
# https://help.github.com/en/github/automating-your-workflow-with-github-actions/contexts-and-expression-syntax-for-github-actions#functions
321+
if: github.event.pull_request.base.repo.id == github.event.pull_request.head.repo.id
322+
&& (
323+
(github.event_name == 'schedule' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')))
324+
||
325+
(github.event_name == 'push' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')))
326+
||
327+
(github.event_name == 'pull_request' && (startsWith(github.head_ref, 'release-')))
328+
)

Dockerfiles/base/Dockerfile-5.2

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,4 +107,5 @@ EXPOSE 9000
107107
###
108108
### Entrypoint
109109
###
110+
CMD ["/usr/local/sbin/php-fpm"]
110111
ENTRYPOINT ["/docker-entrypoint.sh"]

Dockerfiles/base/Dockerfile-5.3

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,4 +107,5 @@ EXPOSE 9000
107107
###
108108
### Entrypoint
109109
###
110+
CMD ["/usr/local/sbin/php-fpm"]
110111
ENTRYPOINT ["/docker-entrypoint.sh"]

Dockerfiles/base/Dockerfile-5.4

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,4 +107,5 @@ EXPOSE 9000
107107
###
108108
### Entrypoint
109109
###
110+
CMD ["/usr/local/sbin/php-fpm"]
110111
ENTRYPOINT ["/docker-entrypoint.sh"]

Dockerfiles/base/Dockerfile-5.5

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,4 +107,5 @@ EXPOSE 9000
107107
###
108108
### Entrypoint
109109
###
110+
CMD ["/usr/local/sbin/php-fpm"]
110111
ENTRYPOINT ["/docker-entrypoint.sh"]

Dockerfiles/base/Dockerfile-5.6

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,4 +100,5 @@ EXPOSE 9000
100100
###
101101
### Entrypoint
102102
###
103+
CMD ["/usr/local/sbin/php-fpm"]
103104
ENTRYPOINT ["/docker-entrypoint.sh"]

Dockerfiles/base/Dockerfile-7.0

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,4 +100,5 @@ EXPOSE 9000
100100
###
101101
### Entrypoint
102102
###
103+
CMD ["/usr/local/sbin/php-fpm"]
103104
ENTRYPOINT ["/docker-entrypoint.sh"]

Dockerfiles/base/Dockerfile-7.1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,4 +100,5 @@ EXPOSE 9000
100100
###
101101
### Entrypoint
102102
###
103+
CMD ["/usr/local/sbin/php-fpm"]
103104
ENTRYPOINT ["/docker-entrypoint.sh"]

0 commit comments

Comments
 (0)