Add scratch, and incremental build tags

This commit is contained in:
Marcel Schwarz 2020-03-29 18:33:57 +02:00
parent de940b6b0c
commit ed0cf6ad32
3 changed files with 42 additions and 10 deletions

View File

@ -3,8 +3,7 @@ name: Deploy
on: on:
push: push:
branches: branches:
- master - master
- github-actions
schedule: schedule:
- cron: 0 18 * * * - cron: 0 18 * * *
@ -18,17 +17,23 @@ jobs:
run: echo ${{secrets.DOCKERHUB_PASSWORD}} | docker login -u ${{secrets.DOCKERHUB_USER}} --password-stdin run: echo ${{secrets.DOCKERHUB_PASSWORD}} | docker login -u ${{secrets.DOCKERHUB_USER}} --password-stdin
- name: Build infraonly - name: Build infraonly
working-directory: ./ctan working-directory: ./scratch
run: docker build -t ${{secrets.DOCKERHUB_USER}}/latex:infraonly -f Dockerfile.infraonly . run: docker build -t ${{secrets.DOCKERHUB_USER}}/latex:infraonly-incremental .
- name: Upload infraonly-incremental image
run: docker push ${{secrets.DOCKERHUB_USER}}/latex:infraonly-incremental
- name: Upload infraonly image - name: Upload infraonly image
run: docker push ${{secrets.DOCKERHUB_USER}}/latex:infraonly run: |
docker tag ${{secrets.DOCKERHUB_USER}}/latex:infraonly-incremental ${{secrets.DOCKERHUB_USER}}/latex:infraonly
docker push ${{secrets.DOCKERHUB_USER}}/latex:infraonly
build-incremental: build-incremental:
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: [build-infraonly] needs: [build-infraonly]
strategy: strategy:
max-parallel: 1 max-parallel: 1
fail-fast: true
matrix: matrix:
scheme : [minimal, basic, small, context, gust, medium, tetex, full] scheme : [minimal, basic, small, context, gust, medium, tetex, full]
include: include:
@ -57,14 +62,39 @@ jobs:
run: echo ${{secrets.DOCKERHUB_PASSWORD}} | docker login -u ${{secrets.DOCKERHUB_USER}} --password-stdin run: echo ${{secrets.DOCKERHUB_PASSWORD}} | docker login -u ${{secrets.DOCKERHUB_USER}} --password-stdin
- name: Build ${{matrix.scheme}} - name: Build ${{matrix.scheme}}
working-directory: ./ctan working-directory: ./incrental
run: docker build -t ${{secrets.DOCKERHUB_USER}}/latex:${{matrix.scheme}} --build-arg SOURCE=${{matrix.source}} --build-arg SCHEME=${{matrix.scheme}} . run: docker build -t ${{secrets.DOCKERHUB_USER}}/latex:${{matrix.scheme}}-incremental --build-arg SOURCE=${{matrix.source}} --build-arg SCHEME=${{matrix.scheme}} .
- name: Upload ${{matrix.scheme}}-incremental
run: docker push ${{secrets.DOCKERHUB_USER}}/latex:${{matrix.scheme}}-incremental
- name: Upload ${{matrix.scheme}} - name: Upload ${{matrix.scheme}}
run: docker push ${{secrets.DOCKERHUB_USER}}/latex:${{matrix.scheme}} run: |
docker tag ${{secrets.DOCKERHUB_USER}}/latex:${{matrix.scheme}}-incremental ${{secrets.DOCKERHUB_USER}}/latex:${{matrix.scheme}}
docker push ${{secrets.DOCKERHUB_USER}}/latex:${{matrix.scheme}}
- name: Tag as latest - name: Tag as latest
if: matrix.isLatest if: matrix.isLatest
run: | run: |
docker tag ${{secrets.DOCKERHUB_USER}}/latex:${{matrix.scheme}} ${{secrets.DOCKERHUB_USER}}/latex:latest docker tag ${{secrets.DOCKERHUB_USER}}/latex:${{matrix.scheme}}-incremental ${{secrets.DOCKERHUB_USER}}/latex:latest
docker push ${{secrets.DOCKERHUB_USER}}/latex:latest docker push ${{secrets.DOCKERHUB_USER}}/latex:latest
build-scratch:
runs-on: ubuntu-latest
needs: [build-infraonly]
strategy:
matrix:
scheme: [minimal, basic, small, context, gust, medium, tetex, full]
fail-fast: false
steps:
- uses: actions/checkout@v2
- name: Login to Dockerhub
run: echo ${{secrets.DOCKERHUB_PASSWORD}} | docker login -u ${{secrets.DOCKERHUB_USER}} --password-stdin
- name: Build ${{matrix.scheme}} from scratch
working-directory: ./scratch
run: docker build -t ${{secrets.DOCKERHUB_USER}}/latex:${{matrix.scheme}}-scratch --build-arg SCHEME=${{matrix.scheme}}.
- name: Upload ${{matrix.scheme}}-scratch image
run: docker push ${{secrets.DOCKERHUB_USER}}/latex:${{matrix.scheme}}-scratch

View File

@ -8,11 +8,13 @@ RUN apt-get update -q \
&& apt-get install -qy build-essential wget libfontconfig1 \ && apt-get install -qy build-essential wget libfontconfig1 \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*
ARG SCHEME=infraonly
# Install TexLive with scheme-infraonly # Install TexLive with scheme-infraonly
RUN wget http://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz \ RUN wget http://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz \
&& mkdir /install-tl-unx \ && mkdir /install-tl-unx \
&& tar -xvf install-tl-unx.tar.gz -C /install-tl-unx --strip-components=1 \ && tar -xvf install-tl-unx.tar.gz -C /install-tl-unx --strip-components=1 \
&& echo "selected_scheme scheme-infraonly" >> /install-tl-unx/texlive.profile \ && echo "selected_scheme scheme-${SCHEME}" >> /install-tl-unx/texlive.profile \
&& /install-tl-unx/install-tl -profile /install-tl-unx/texlive.profile \ && /install-tl-unx/install-tl -profile /install-tl-unx/texlive.profile \
&& rm -r /install-tl-unx \ && rm -r /install-tl-unx \
&& rm install-tl-unx.tar.gz && rm install-tl-unx.tar.gz