mirror of
https://git.fifo-f.eu/tex-projects/docker-images.git
synced 2025-04-18 12:48:19 +02:00
Add workflow file for Gitea
This commit is contained in:
parent
1a76d069cd
commit
93137537f4
1 changed files with 42 additions and 0 deletions
42
.gitea/workflows/ci.yml
Normal file
42
.gitea/workflows/ci.yml
Normal file
|
@ -0,0 +1,42 @@
|
|||
name: Create complete Overleaf Docker image with all TeX Live packages
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on:
|
||||
labels: ubuntu-latest-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/tex/systems/texlive/tlnet/ && \
|
||||
tlmgr update --self --all && \
|
||||
tlmgr install scheme-full && \
|
||||
tlmgr path add && \
|
||||
apt update && apt install -y inkscape lilypond python3-pygments"
|
||||
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: |
|
||||
docker rm -f temp
|
Loading…
Add table
Add a link
Reference in a new issue