Skip to content

Commit

Permalink
Test APP_VERSION
Browse files Browse the repository at this point in the history
  • Loading branch information
Leo1003 committed Jan 5, 2024
1 parent a17fa80 commit 662213d
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 5 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,22 @@ jobs:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Get APP_VERSION
id: app_version
run: |
content=`cat ./${{ inputs.path }}/APP_VERSION`
echo "::set-output name=version::$content"
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository }}/${{ inputs.name }}
tags: |
type=semver,pattern={{version}},value=${{ steps.app_version.version }}
type=semver,pattern={{major}}.{{minor}},value=${{ steps.app_version.version }}
type=semver,pattern={{major}},value=${{ steps.app_version.version }}
type=ref,event=branch
type=sha
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
Expand All @@ -50,6 +61,8 @@ jobs:
context: ${{ inputs.path }}
file: ${{ inputs.path }}/${{ inputs.containerfile }}
push: true
build-args:
- APP_VERSION=${{ steps.app_version.version }}
annotations: ${{ steps.meta.outputs.annotations }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
Expand Down
1 change: 1 addition & 0 deletions nextcloud/APP_VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
24.0.4
10 changes: 5 additions & 5 deletions nextcloud/Containerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
FROM alpine:3.15

ARG APP_VERSION

RUN set -ex; \
\
apk add --no-cache \
bzip2 \
curl \
Expand Down Expand Up @@ -41,7 +42,6 @@ RUN set -ex; \
ln -sf /usr/bin/php8 /usr/bin/php

RUN set -ex; \
\
mkdir -p /var/www/html; \
groupmod -g 101 www-data; \
adduser -h /var/www/html -H -s /sbin/nologin -S -u 101 -G www-data www-data
Expand All @@ -50,8 +50,8 @@ WORKDIR /var/www/html

# set recommended PHP.ini settings
# see https://docs.nextcloud.com/server/stable/admin_manual/configuration_server/server_tuning.html#enable-php-opcache
ENV PHP_MEMORY_LIMIT 512M
ENV PHP_UPLOAD_LIMIT 1024M
ARG PHP_MEMORY_LIMIT=512M
ARG PHP_UPLOAD_LIMIT=1024M
RUN { \
echo 'opcache.enable=1'; \
echo 'opcache.interned_strings_buffer=64'; \
Expand Down Expand Up @@ -80,7 +80,7 @@ RUN { \
chown -R www-data:www-data /var/www; \
chmod -R g=u /var/www

ENV NEXTCLOUD_VERSION 24.0.4
ENV NEXTCLOUD_VERSION=${APP_VERSION}

RUN set -ex; \
curl -fsSL -o nextcloud.tar.bz2 \
Expand Down

0 comments on commit 662213d

Please sign in to comment.