docker-images/.gitea/workflows/ci.yml
Fifo F 2151bf024e
Some checks failed
Create complete Overleaf Docker image with all TeX Live packages / build (push) Failing after 23s
Gitea pipeline updates
Signed-off-by: Fifo F <fifo@fifo-f.eu>
2025-03-14 13:22:43 +01:00

55 lines
No EOL
2.9 KiB
YAML

name: Create complete Overleaf Docker image with all TeX Live packages
on: [push]
jobs:
build:
runs-on:
labels: ubuntu-latest-privileged
services:
docker:
image: docker:24.0.5-dind
options: >-
--privileged
steps:
- name: Remove existing container to avoid conflicts, if present
run: |
if [ "$(docker ps -aq -f name=temp)" ]; then
docker rm -f temp
fi
- name: Log in to Gitea Docker registry
run: echo "${{ secrets.REGISTRY_PASSWORD }}" | docker login ${{ vars.REGISTRY_HOST }} -u ${{ vars.REGISTRY_USER }} --password-stdin
- name: Get Overleaf version number
run: |
curl -sSfL https://raw.githubusercontent.com/overleaf/toolkit/master/lib/config-seed/version -o version.txt
echo "Image version: $(cat version.txt)"
- name: Pull Overleaf Docker image
run: docker pull sharelatex/sharelatex:latest
- name: Expand and save Docker image
run: |
OVERLEAF_VERSION=$(cat version.txt)
docker run --name temp --entrypoint /bin/bash sharelatex/sharelatex:latest -c "
tlmgr option repository https://ftp.tu-chemnitz.de/pub/tug/historic/systems/texlive/2024/tlnet-final && \
tlmgr update --self --all && \
tlmgr install scheme-full && \
luaotfload-tool -fu && \
tlmgr path add && \
apt update && apt install -y inkscape lilypond python3-pygments && \
echo shell_escape = t >> /usr/local/texlive/2024/texmf.cnf && \
echo 'server_tokens off;' > /etc/nginx/conf.d/security.conf"
docker commit --change "ENTRYPOINT /sbin/my_init" temp sharelatex-with-texlive-full:${OVERLEAF_VERSION}
docker tag sharelatex-with-texlive-full:${OVERLEAF_VERSION} sharelatex-with-texlive-full:latest
- name: Push customized Docker image to registry
run: |
OVERLEAF_VERSION=$(cat version.txt)
docker tag sharelatex-with-texlive-full:${OVERLEAF_VERSION} ${{ vars.REGISTRY_HOST }}/tex-projects/sharelatex-with-texlive-full:${OVERLEAF_VERSION}
docker tag sharelatex-with-texlive-full:latest ${{ vars.REGISTRY_HOST }}/tex-projects/sharelatex-with-texlive-full:latest
docker push ${{ vars.REGISTRY_HOST }}/tex-projects/sharelatex-with-texlive-full:${OVERLEAF_VERSION}
docker push ${{ vars.REGISTRY_HOST }}/tex-projects/sharelatex-with-texlive-full:latest
- name: Clean up
run: |
OVERLEAF_VERSION=$(cat version.txt)
echo "Cleaning up"
docker rm -f temp
docker rmi sharelatex/sharelatex:latest
docker rmi ${{ vars.REGISTRY_HOST }}/tex-projects/sharelatex-with-texlive-full:${OVERLEAF_VERSION}
docker rmi ${{ vars.REGISTRY_HOST }}/tex-projects/sharelatex-with-texlive-full:latest