2020-03-29 03:38:09 +02:00
|
|
|
name: Deploy
|
2020-03-28 18:30:36 +01:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
2020-03-29 18:33:57 +02:00
|
|
|
- master
|
2020-03-29 03:51:14 +02:00
|
|
|
schedule:
|
2020-03-29 19:51:25 +02:00
|
|
|
- cron: 0 18 * * 0
|
2020-03-28 18:30:36 +01:00
|
|
|
|
|
|
|
jobs:
|
2020-03-29 19:07:00 +02:00
|
|
|
|
|
|
|
build-infraonly:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Login to Dockerhub
|
|
|
|
run: echo ${{secrets.DOCKERHUB_PASSWORD}} | docker login -u ${{secrets.DOCKERHUB_USER}} --password-stdin
|
|
|
|
|
|
|
|
- name: Build infraonly-scratch
|
|
|
|
working-directory: ./scratch
|
|
|
|
run: docker build -t ${{secrets.DOCKERHUB_USER}}/latex:infraonly-scratch --build-arg SCHEME=infraonly .
|
|
|
|
|
|
|
|
- name: Upload infraonly-scratch image
|
|
|
|
run: docker push ${{secrets.DOCKERHUB_USER}}/latex:infraonly-scratch
|
|
|
|
|
|
|
|
- name: Upload infraonly
|
|
|
|
run: |
|
|
|
|
docker tag ${{secrets.DOCKERHUB_USER}}/latex:infraonly-scratch ${{secrets.DOCKERHUB_USER}}/latex:infraonly
|
|
|
|
docker push ${{secrets.DOCKERHUB_USER}}/latex:infraonly
|
|
|
|
|
2020-03-29 18:34:15 +02:00
|
|
|
build-scratch:
|
2020-03-28 18:30:36 +01:00
|
|
|
runs-on: ubuntu-latest
|
2020-03-29 18:34:15 +02:00
|
|
|
strategy:
|
|
|
|
matrix:
|
2020-03-29 19:07:00 +02:00
|
|
|
scheme: [minimal, basic, small, context, gust, medium, tetex, full]
|
2020-03-29 18:49:26 +02:00
|
|
|
include:
|
|
|
|
- scheme: full
|
|
|
|
isLatest: true
|
2020-03-29 18:34:15 +02:00
|
|
|
fail-fast: false
|
2020-03-28 18:30:36 +01:00
|
|
|
steps:
|
2020-03-29 18:34:15 +02:00
|
|
|
- uses: actions/checkout@v2
|
2020-03-29 18:33:57 +02:00
|
|
|
|
2020-03-29 18:34:15 +02:00
|
|
|
- name: Login to Dockerhub
|
|
|
|
run: echo ${{secrets.DOCKERHUB_PASSWORD}} | docker login -u ${{secrets.DOCKERHUB_USER}} --password-stdin
|
|
|
|
|
2020-03-29 18:49:26 +02:00
|
|
|
- name: Build ${{matrix.scheme}}-scratch
|
2020-03-29 18:34:15 +02:00
|
|
|
working-directory: ./scratch
|
2020-03-29 18:51:47 +02:00
|
|
|
run: docker build -t ${{secrets.DOCKERHUB_USER}}/latex:${{matrix.scheme}}-scratch --build-arg SCHEME=${{matrix.scheme}} .
|
2020-03-29 18:34:15 +02:00
|
|
|
|
|
|
|
- name: Upload ${{matrix.scheme}}-scratch image
|
|
|
|
run: docker push ${{secrets.DOCKERHUB_USER}}/latex:${{matrix.scheme}}-scratch
|
2020-03-29 18:49:26 +02:00
|
|
|
|
|
|
|
- name: Upload ${{matrix.scheme}}
|
|
|
|
run: |
|
|
|
|
docker tag ${{secrets.DOCKERHUB_USER}}/latex:${{matrix.scheme}}-scratch ${{secrets.DOCKERHUB_USER}}/latex:${{matrix.scheme}}
|
|
|
|
docker push ${{secrets.DOCKERHUB_USER}}/latex:${{matrix.scheme}}
|
|
|
|
|
|
|
|
- name: Tag as latest
|
|
|
|
if: matrix.isLatest
|
|
|
|
run: |
|
2020-03-29 19:07:00 +02:00
|
|
|
docker tag ${{secrets.DOCKERHUB_USER}}/latex:${{matrix.scheme}}-scratch ${{secrets.DOCKERHUB_USER}}/latex:latest
|
2020-03-29 18:49:26 +02:00
|
|
|
docker push ${{secrets.DOCKERHUB_USER}}/latex:latest
|
2020-03-28 18:30:36 +01:00
|
|
|
|
2020-03-28 19:06:24 +01:00
|
|
|
build-incremental:
|
2020-03-28 18:30:36 +01:00
|
|
|
runs-on: ubuntu-latest
|
2020-03-29 19:07:00 +02:00
|
|
|
needs: [build-infraonly]
|
2020-03-29 03:38:09 +02:00
|
|
|
strategy:
|
2020-03-29 03:51:14 +02:00
|
|
|
max-parallel: 1
|
2020-03-29 18:33:57 +02:00
|
|
|
fail-fast: true
|
2020-03-29 03:38:09 +02:00
|
|
|
matrix:
|
2020-03-29 03:51:14 +02:00
|
|
|
scheme : [minimal, basic, small, context, gust, medium, tetex, full]
|
2020-03-29 03:38:09 +02:00
|
|
|
include:
|
|
|
|
- scheme: minimal
|
|
|
|
source: infraonly
|
|
|
|
- scheme: basic
|
2020-03-29 19:51:25 +02:00
|
|
|
source: minimal-incremental
|
2020-03-29 03:51:14 +02:00
|
|
|
- scheme: small
|
2020-03-29 19:51:25 +02:00
|
|
|
source: basic-incremental
|
2020-03-29 03:51:14 +02:00
|
|
|
- scheme: context
|
2020-03-29 19:51:25 +02:00
|
|
|
source: small-incremental
|
2020-03-29 03:51:14 +02:00
|
|
|
- scheme: gust
|
2020-03-29 19:51:25 +02:00
|
|
|
source: context-incremental
|
2020-03-29 03:51:14 +02:00
|
|
|
- scheme: medium
|
2020-03-29 19:51:25 +02:00
|
|
|
source: gust-incremental
|
2020-03-29 03:51:14 +02:00
|
|
|
- scheme: tetex
|
2020-03-29 19:51:25 +02:00
|
|
|
source: medium-incremental
|
2020-03-29 03:51:14 +02:00
|
|
|
- scheme: full
|
2020-03-29 19:51:25 +02:00
|
|
|
source: tetex-incremental
|
2020-03-29 03:51:14 +02:00
|
|
|
|
2020-03-28 18:30:36 +01:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Login to Dockerhub
|
|
|
|
run: echo ${{secrets.DOCKERHUB_PASSWORD}} | docker login -u ${{secrets.DOCKERHUB_USER}} --password-stdin
|
|
|
|
|
2020-03-29 03:38:09 +02:00
|
|
|
- name: Build ${{matrix.scheme}}
|
2020-03-29 19:12:39 +02:00
|
|
|
working-directory: ./incremental
|
2020-03-29 18:33:57 +02:00
|
|
|
run: docker build -t ${{secrets.DOCKERHUB_USER}}/latex:${{matrix.scheme}}-incremental --build-arg SOURCE=${{matrix.source}} --build-arg SCHEME=${{matrix.scheme}} .
|
2020-03-29 03:38:09 +02:00
|
|
|
|
2020-03-29 18:33:57 +02:00
|
|
|
- name: Upload ${{matrix.scheme}}-incremental
|
|
|
|
run: docker push ${{secrets.DOCKERHUB_USER}}/latex:${{matrix.scheme}}-incremental
|