add docker build cache

This commit is contained in:
Andrew Dolgov 2023-03-27 09:34:02 +03:00
parent 33a3672eab
commit ecedc51162
No known key found for this signature in database
GPG Key ID: 1A56B4FA25D4AF2A
2 changed files with 6 additions and 2 deletions

View File

@ -4,8 +4,6 @@ EXPOSE 9000/tcp
ENV SCRIPT_ROOT=/opt/tt-rss ENV SCRIPT_ROOT=/opt/tt-rss
ENV SRC_DIR=/src/tt-rss/ ENV SRC_DIR=/src/tt-rss/
COPY --from=app-src . ${SRC_DIR}
RUN apk add --no-cache dcron php81 php81-fpm php81-phar \ RUN apk add --no-cache dcron php81 php81-fpm php81-phar \
php81-pdo php81-gd php81-pgsql php81-pdo_pgsql php81-xmlwriter \ php81-pdo php81-gd php81-pgsql php81-pdo_pgsql php81-xmlwriter \
php81-mbstring php81-intl php81-xml php81-curl php81-simplexml \ php81-mbstring php81-intl php81-xml php81-curl php81-simplexml \
@ -29,6 +27,8 @@ ADD --chmod=0755 backup.sh /etc/periodic/weekly/backup
ADD index.php ${SCRIPT_ROOT} ADD index.php ${SCRIPT_ROOT}
ADD config.docker.php ${SCRIPT_ROOT} ADD config.docker.php ${SCRIPT_ROOT}
COPY --from=app-src . ${SRC_DIR}
ARG ORIGIN_REPO_MAIN=https://git.tt-rss.org/fox/tt-rss.git ARG ORIGIN_REPO_MAIN=https://git.tt-rss.org/fox/tt-rss.git
ARG ORIGIN_REPO_XACCEL=https://git.tt-rss.org/fox/ttrss-nginx-xaccel.git ARG ORIGIN_REPO_XACCEL=https://git.tt-rss.org/fox/ttrss-nginx-xaccel.git
ARG ORIGIN_COMMIT= ARG ORIGIN_COMMIT=

View File

@ -88,6 +88,8 @@ jobs:
tags: ${{ steps.meta_web_nginx.outputs.tags }} tags: ${{ steps.meta_web_nginx.outputs.tags }}
labels: ${{ steps.meta_web_nginx.outputs.labels }} labels: ${{ steps.meta_web_nginx.outputs.labels }}
provenance: false provenance: false
cache-from: type=registry,ref=${{ secrets.REGISTRY_HOST }}/cthulhoo/ttrss-web-nginx:latest
cache-to: type=inline
- name: get docker meta for app - name: get docker meta for app
id: meta_app id: meta_app
@ -111,3 +113,5 @@ jobs:
tags: ${{ steps.meta_app.outputs.tags }} tags: ${{ steps.meta_app.outputs.tags }}
labels: ${{ steps.meta_app.outputs.labels }} labels: ${{ steps.meta_app.outputs.labels }}
provenance: false provenance: false
cache-from: type=registry,ref=${{ secrets.REGISTRY_HOST }}/cthulhoo/ttrss-fpm-pgsql-static:latest
cache-to: type=inline