Add github workflow (#1)
This commit is contained in:
parent
6b973c4891
commit
8bd9a39742
53
.github/workflows/build.yml
vendored
Normal file
53
.github/workflows/build.yml
vendored
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
name: Monica's docker
|
||||||
|
|
||||||
|
on: [push]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ${{ matrix.operating-system }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
operating-system: [ubuntu-latest]
|
||||||
|
variant: [apache, fpm, fpm-alpine]
|
||||||
|
arch: [amd64, i386]
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
repository: 'docker-library/official-images'
|
||||||
|
path: 'official-images'
|
||||||
|
|
||||||
|
- name: Fix image
|
||||||
|
if: matrix.arch == 'i386'
|
||||||
|
run: |
|
||||||
|
sed -i -e 's/FROM php/FROM i386\/php/g' "${{ matrix.variant }}/Dockerfile"
|
||||||
|
|
||||||
|
- name: Build image ${{ matrix.variant }} ${{ matrix.arch }}
|
||||||
|
run: |
|
||||||
|
docker build ${{ matrix.variant }} -t monica:${{ matrix.variant }}
|
||||||
|
docker images
|
||||||
|
|
||||||
|
- name: Test image ${{ matrix.variant }} ${{ matrix.arch }}
|
||||||
|
run: |
|
||||||
|
official-images/test/run.sh monica:${{ matrix.variant }}
|
||||||
|
|
||||||
|
test:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Test update script
|
||||||
|
run: |
|
||||||
|
hash_before=$(git write-tree)
|
||||||
|
./update.sh
|
||||||
|
bash -c "[[ $hash_before = $(git add -A && git write-tree) ]]"
|
||||||
|
|
||||||
|
- name: Install bashbrew
|
||||||
|
run: |
|
||||||
|
curl -fsSL -o bashbrew https://doi-janky.infosiftr.net/job/bashbrew/lastSuccessfulBuild/artifact/bin/bashbrew-amd64
|
||||||
|
chmod +x "bashbrew"
|
||||||
|
echo "::add-path::$(pwd)"
|
||||||
|
- name: Run stackbrew
|
||||||
|
run: |
|
||||||
|
./generate-stackbrew-library.sh
|
||||||
@ -1,12 +1,6 @@
|
|||||||
FROM php:%%PHP_VERSION%%-%%VARIANT%%
|
FROM php:%%PHP_VERSION%%-%%VARIANT%%
|
||||||
|
|
||||||
LABEL maintainer="Alexis Saettler <alexis@saettler.org> (@asbiin)" \
|
%%LABEL%%
|
||||||
org.label-schema.name="MonicaHQ, the Personal Relationship Manager" \
|
|
||||||
org.label-schema.description="This is MonicaHQ, your personal memory! MonicaHQ is like a CRM but for the friends, family, and acquaintances around you." \
|
|
||||||
org.label-schema.url="https://monicahq.com" \
|
|
||||||
org.label-schema.vcs-url="https://github.com/monicahq/monica" \
|
|
||||||
org.label-schema.vendor="Monica" \
|
|
||||||
org.label-schema.schema-version="1.0"
|
|
||||||
|
|
||||||
# entrypoint.sh dependencies
|
# entrypoint.sh dependencies
|
||||||
RUN set -ex; \
|
RUN set -ex; \
|
||||||
@ -15,7 +9,8 @@ RUN set -ex; \
|
|||||||
bash \
|
bash \
|
||||||
coreutils \
|
coreutils \
|
||||||
rsync \
|
rsync \
|
||||||
;
|
; \
|
||||||
|
rm -rf /var/cache/apk/*
|
||||||
|
|
||||||
# Install required PHP extensions
|
# Install required PHP extensions
|
||||||
RUN set -ex; \
|
RUN set -ex; \
|
||||||
@ -76,7 +71,8 @@ RUN set -ex; \
|
|||||||
| awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \
|
| awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \
|
||||||
)"; \
|
)"; \
|
||||||
apk add --virtual .monica-phpext-rundeps $runDeps; \
|
apk add --virtual .monica-phpext-rundeps $runDeps; \
|
||||||
apk del .build-deps
|
apk del .build-deps; \
|
||||||
|
rm -rf /var/cache/apk/*
|
||||||
|
|
||||||
# Set crontab for schedules
|
# Set crontab for schedules
|
||||||
RUN set -ex; \
|
RUN set -ex; \
|
||||||
@ -130,7 +126,8 @@ RUN set -ex; \
|
|||||||
cp /usr/src/monica/.env.example /usr/src/monica/.env; \
|
cp /usr/src/monica/.env.example /usr/src/monica/.env; \
|
||||||
chown -R www-data:www-data /usr/src/monica; \
|
chown -R www-data:www-data /usr/src/monica; \
|
||||||
\
|
\
|
||||||
apk del .fetch-deps
|
apk del .fetch-deps; \
|
||||||
|
rm -rf /var/cache/apk/*
|
||||||
|
|
||||||
COPY upgrade.exclude \
|
COPY upgrade.exclude \
|
||||||
/usr/local/share/
|
/usr/local/share/
|
||||||
|
|||||||
@ -1,17 +1,12 @@
|
|||||||
FROM php:%%PHP_VERSION%%-%%VARIANT%%
|
FROM php:%%PHP_VERSION%%-%%VARIANT%%
|
||||||
|
|
||||||
LABEL maintainer="Alexis Saettler <alexis@saettler.org> (@asbiin)" \
|
%%LABEL%%
|
||||||
org.label-schema.name="MonicaHQ, the Personal Relationship Manager" \
|
|
||||||
org.label-schema.description="This is MonicaHQ, your personal memory! MonicaHQ is like a CRM but for the friends, family, and acquaintances around you." \
|
|
||||||
org.label-schema.url="https://monicahq.com" \
|
|
||||||
org.label-schema.vcs-url="https://github.com/monicahq/monica" \
|
|
||||||
org.label-schema.vendor="Monica" \
|
|
||||||
org.label-schema.schema-version="1.0"
|
|
||||||
|
|
||||||
# entrypoint.sh dependencies
|
# entrypoint.sh dependencies
|
||||||
RUN set -ex; \
|
RUN set -ex; \
|
||||||
\
|
\
|
||||||
apt-get update; \
|
apt-get update; \
|
||||||
|
apt-get -y autoremove; \
|
||||||
apt-get install -y --no-install-recommends \
|
apt-get install -y --no-install-recommends \
|
||||||
rsync \
|
rsync \
|
||||||
bash \
|
bash \
|
||||||
|
|||||||
@ -12,6 +12,7 @@ LABEL maintainer="Alexis Saettler <alexis@saettler.org> (@asbiin)" \
|
|||||||
RUN set -ex; \
|
RUN set -ex; \
|
||||||
\
|
\
|
||||||
apt-get update; \
|
apt-get update; \
|
||||||
|
apt-get -y autoremove; \
|
||||||
apt-get install -y --no-install-recommends \
|
apt-get install -y --no-install-recommends \
|
||||||
rsync \
|
rsync \
|
||||||
bash \
|
bash \
|
||||||
|
|||||||
@ -15,7 +15,8 @@ RUN set -ex; \
|
|||||||
bash \
|
bash \
|
||||||
coreutils \
|
coreutils \
|
||||||
rsync \
|
rsync \
|
||||||
;
|
; \
|
||||||
|
rm -rf /var/cache/apk/*
|
||||||
|
|
||||||
# Install required PHP extensions
|
# Install required PHP extensions
|
||||||
RUN set -ex; \
|
RUN set -ex; \
|
||||||
@ -76,7 +77,8 @@ RUN set -ex; \
|
|||||||
| awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \
|
| awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \
|
||||||
)"; \
|
)"; \
|
||||||
apk add --virtual .monica-phpext-rundeps $runDeps; \
|
apk add --virtual .monica-phpext-rundeps $runDeps; \
|
||||||
apk del .build-deps
|
apk del .build-deps; \
|
||||||
|
rm -rf /var/cache/apk/*
|
||||||
|
|
||||||
# Set crontab for schedules
|
# Set crontab for schedules
|
||||||
RUN set -ex; \
|
RUN set -ex; \
|
||||||
@ -130,7 +132,8 @@ RUN set -ex; \
|
|||||||
cp /usr/src/monica/.env.example /usr/src/monica/.env; \
|
cp /usr/src/monica/.env.example /usr/src/monica/.env; \
|
||||||
chown -R www-data:www-data /usr/src/monica; \
|
chown -R www-data:www-data /usr/src/monica; \
|
||||||
\
|
\
|
||||||
apk del .fetch-deps
|
apk del .fetch-deps; \
|
||||||
|
rm -rf /var/cache/apk/*
|
||||||
|
|
||||||
COPY upgrade.exclude \
|
COPY upgrade.exclude \
|
||||||
/usr/local/share/
|
/usr/local/share/
|
||||||
|
|||||||
@ -12,6 +12,7 @@ LABEL maintainer="Alexis Saettler <alexis@saettler.org> (@asbiin)" \
|
|||||||
RUN set -ex; \
|
RUN set -ex; \
|
||||||
\
|
\
|
||||||
apt-get update; \
|
apt-get update; \
|
||||||
|
apt-get -y autoremove; \
|
||||||
apt-get install -y --no-install-recommends \
|
apt-get install -y --no-install-recommends \
|
||||||
rsync \
|
rsync \
|
||||||
bash \
|
bash \
|
||||||
|
|||||||
@ -28,6 +28,14 @@ RUN set -eu; sed -ri -e \"s!/var/www/html!\\\${APACHE_DOCUMENT_ROOT}!g\" /etc/ap
|
|||||||
[fpm-alpine]=''
|
[fpm-alpine]=''
|
||||||
)
|
)
|
||||||
|
|
||||||
|
label="LABEL maintainer=\"Alexis Saettler <alexis@saettler.org> (@asbiin)\" \\\\\\n\
|
||||||
|
org.label-schema.name=\"MonicaHQ, the Personal Relationship Manager\" \\\\\\n\
|
||||||
|
org.label-schema.description=\"This is MonicaHQ, your personal memory! MonicaHQ is like a CRM but for the friends, family, and acquaintances around you.\" \\\\\\n\
|
||||||
|
org.label-schema.url=\"https://monicahq.com\" \\\\\\n\
|
||||||
|
org.label-schema.vcs-url=\"https://github.com/monicahq/monica\" \\\\\\n\
|
||||||
|
org.label-schema.vendor=\"Monica\" \\\\\\n\
|
||||||
|
org.label-schema.schema-version=\"1.0\""
|
||||||
|
|
||||||
apcu_version="$(
|
apcu_version="$(
|
||||||
git ls-remote --tags https://github.com/krakjoe/apcu.git \
|
git ls-remote --tags https://github.com/krakjoe/apcu.git \
|
||||||
| cut -d/ -f3 \
|
| cut -d/ -f3 \
|
||||||
@ -78,6 +86,7 @@ for variant in apache fpm fpm-alpine; do
|
|||||||
s/%%VERSION%%/'"$version"'/;
|
s/%%VERSION%%/'"$version"'/;
|
||||||
s/%%SHA512%%/'"$sha512"'/;
|
s/%%SHA512%%/'"$sha512"'/;
|
||||||
s/%%CMD%%/'"${cmd[$variant]}"'/;
|
s/%%CMD%%/'"${cmd[$variant]}"'/;
|
||||||
|
s#%%LABEL%%#'"$label"'#;
|
||||||
s#%%APACHE_DOCUMENT%%#'"${document[$variant]}"'#;
|
s#%%APACHE_DOCUMENT%%#'"${document[$variant]}"'#;
|
||||||
s/%%APCU_VERSION%%/'"${pecl_versions[APCu]}"'/;
|
s/%%APCU_VERSION%%/'"${pecl_versions[APCu]}"'/;
|
||||||
s/%%MEMCACHED_VERSION%%/'"${pecl_versions[memcached]}"'/;
|
s/%%MEMCACHED_VERSION%%/'"${pecl_versions[memcached]}"'/;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user