Skip to content

Commit 831bcdb

Browse files
committed
github actions CI work
1 parent 89b7810 commit 831bcdb

Some content is hidden

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

83 files changed

+35
-2996
lines changed

.github/workflows/php8-0-nginx.yml

Lines changed: 0 additions & 60 deletions
This file was deleted.

.github/workflows/php8-1-nginx.yml

Lines changed: 0 additions & 60 deletions
This file was deleted.

.github/workflows/php8-2-nginx.yml

Lines changed: 0 additions & 60 deletions
This file was deleted.

.github/workflows/php8-nginx.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ name: "PHP 8 nginx"
22

33
on:
44
workflow_dispatch:
5-
# schedule:
6-
# - cron: '35 22 * * 2'
5+
schedule:
6+
- cron: '35 22 * * 2'
77
# push:
88
# branches: [ "main" ]
99
# paths:

8-nginx/Dockerfile

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -106,11 +106,13 @@ RUN set -ex; \
106106
; \
107107
mkdir -p /var/www && mkdir /usr/src/default \
108108
; \
109-
curl https://repository.monarx.com/repository/monarx/publickey/monarxpub.gpg | gpg -o /usr/share/keyrings/monarx-archive-keyring.gpg --dearmor \
110-
&& echo "deb [signed-by=/usr/share/keyrings/monarx-archive-keyring.gpg] https://repository.monarx.com/repository/ubuntu-jammy/ jammy main" > /etc/apt/sources.list.d/monarx.list \
111-
; \
112-
apt-get update \
113-
&& apt-get -y install monarx-agent monarx-protect \
109+
if [ "$(dpkg --print-architecture)" = "amd64" ]; then \
110+
curl https://repository.monarx.com/repository/monarx/publickey/monarxpub.gpg | gpg -o /usr/share/keyrings/monarx-archive-keyring.gpg --dearmor \
111+
&& echo "deb [signed-by=/usr/share/keyrings/monarx-archive-keyring.gpg] https://repository.monarx.com/repository/ubuntu-jammy/ jammy main" > /etc/apt/sources.list.d/monarx.list \
112+
; \
113+
apt-get update \
114+
&& apt-get -y install monarx-agent monarx-protect; \
115+
fi \
114116
; \
115117
mkdir -p /etc/service/php-fpm \
116118
&& mkdir -p /etc/service/postfix \
@@ -133,8 +135,14 @@ RUN cd /usr/src; \
133135
&& echo "extension=redis.so" > /etc/php/$php_version/mods-available/redis.ini \
134136
&& /usr/sbin/phpenmod redis \
135137
; \
138+
if [ "$(dpkg --print-architecture)" = "amd64" ]; then \
139+
RELAY_ARCH="x86-64"; \
140+
else \
141+
RELAY_ARCH="aarch64"; \
142+
fi \
143+
; \
136144
RELAY_VERSION=$(curl -fs -L https://builds.r2.relay.so/meta/latest | awk -F '"' '{print $1}') \
137-
&& wget -O /tmp/relay.tar.gz "https://builds.r2.relay.so/$RELAY_VERSION/relay-$RELAY_VERSION-php${php_version}-debian-x86-64%2Blibssl3.tar.gz" \
145+
&& wget -O /tmp/relay.tar.gz "https://builds.r2.relay.so/${RELAY_VERSION}/relay-${RELAY_VERSION}-php${php_version}-debian-${RELAY_ARCH}%2Blibssl3.tar.gz" \
138146
&& tar -xzf /tmp/relay.tar.gz -C /usr/src \
139147
&& mv /usr/src/relay-* /usr/src/relay \
140148
&& sed -i "s/00000000-0000-0000-0000-000000000000/$(cat /proc/sys/kernel/random/uuid)/" /usr/src/relay/relay-pkg.so \

8-nginx/startup/90-monarx-entry.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
#!/usr/bin/env bash
22

3+
if [ ! -f /usr/bin/monarx-agen ]; then
4+
echo >&2 "Monarx binary not found, disabling monarx service."
5+
if [ ! -f /etc/service/monarx/down ]; then
6+
touch /etc/service/monarx/down
7+
fi
8+
exit 0
9+
fi
10+
311
MONARX_PHP_VERSION=$(echo $PHP_VERSION | awk '{split($0,i,".");print i[1] i[2]}')
412
PHP_INI_DIR=/etc/php/${PHP_VERSION}/mods-available/
513
PHP_EXT_DIR=$(/usr/bin/php-config --extension-dir)

0 commit comments

Comments
 (0)