Skip to content

Commit 746d9ae

Browse files
committed
fetch the release from s3 for building
1 parent 1c28c0f commit 746d9ae

File tree

2 files changed

+13
-9
lines changed

2 files changed

+13
-9
lines changed

.github/workflows/build-release.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -224,5 +224,5 @@ jobs:
224224
with:
225225
push: true
226226
no-cache: true
227-
build-args: VERSION=${{ env.RELEASE_VERSION }}
227+
build-args: VERSION=${{ env.RELEASE_VERSION }},S3_VERSIONS_BUCKET=${{ secrets.AWS_S3_VERSIONS_BUCKET }},AWS_ACCESSKEY=${{ secrets.AWS_KEY_ID }},AWS_SECRETKEY=${{ secrets.AWS_SECRET_ACCESS_KEY }}
228228
tags: ${{ secrets.DOCKERHUB_USERNAME }}/phplist-dev:${{ env.RELEASE_VERSION }}

Dockerfile

+12-8
Original file line numberDiff line numberDiff line change
@@ -3,28 +3,32 @@ FROM debian:buster-slim
33

44
LABEL maintainer="michiel@phplist.com"
55

6-
RUN apt-get update && apt-get upgrade -y
6+
RUN apt-get update && apt-get upgrade -y
77

8-
RUN apt-get install -y apt-utils \
9-
vim apache2 net-tools php-mysql \
10-
libapache2-mod-php php-curl php-gd \
11-
git cron php-imap php-xml php-zip php-mbstring
8+
RUN apt-get install -y apt-utils \
9+
vim apache2 net-tools php-mysql \
10+
libapache2-mod-php php-curl php-gd \
11+
git cron php-imap php-xml php-zip php-mbstring s4cmd
1212

1313
RUN useradd -d /var/www/phpList3 phplist
1414

1515
ARG VERSION=unknown
1616
RUN echo VERSION=${VERSION}
17+
ARG AWS_ACCESSKEY=x
18+
ARG AWS_SECRETKEY=y
1719

18-
RUN rm -rf /var/www/phpList3 && mkdir /var/www/phpList3
20+
RUN rm -rf /var/www/phpList3 && mkdir -p /var/www/phpList3
1921
RUN rm -rf /etc/phplist && mkdir /etc/phplist
2022

2123
COPY docker/docker-apache-phplist.conf /etc/apache2/sites-available
2224
COPY docker/docker-entrypoint.sh /usr/local/bin/
2325
COPY docker/phplist-crontab /etc/cron.d/
2426
COPY docker/docker-phplist-config-live.php /etc/phplist/
2527

26-
#COPY phplist-$VERSION /var/www/phpList3
27-
COPY . /var/www/phpList3
28+
RUN s4cmd --access-key=$AWS_ACCESSKEY --secret-key=$AWS_SECRETKEY get s3://$S3_VERSIONS_BUCKET/phplist-$VERSION.tgz ./
29+
30+
RUN tar zvxf phplist-$VERSION.tgz
31+
RUN mv phplist-$VERSION/* /var/www/phpList3/
2832

2933
RUN rm -f /etc/apache2/sites-enabled/000-default.conf && \
3034
cd /var/www/ && find . -type d -name .git -print0 | xargs -0 rm -rf && \

0 commit comments

Comments
 (0)