latex/.github/workflows/main.yml

56 lines
1.7 KiB
YAML
Raw Normal View History

name: Deploy
2020-03-28 18:30:36 +01:00
on:
push:
branches:
- master
- github-actions
jobs:
2020-03-28 19:06:24 +01:00
build-infraonly:
2020-03-28 18:30:36 +01:00
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
2020-03-28 18:30:36 +01:00
- name: Login to Dockerhub
run: echo ${{secrets.DOCKERHUB_PASSWORD}} | docker login -u ${{secrets.DOCKERHUB_USER}} --password-stdin
2020-03-28 18:55:08 +01:00
- name: Build infraonly
working-directory: ./ctan
run: docker build -t ${{secrets.DOCKERHUB_USER}}/latex:infraonly -f Dockerfile.infraonly .
2020-03-28 18:38:29 +01:00
2020-03-28 18:55:08 +01:00
- name: Upload infraonly image
2020-03-28 18:38:29 +01:00
run: docker push ${{secrets.DOCKERHUB_USER}}/latex:infraonly
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-28 19:06:24 +01:00
needs: [build-infraonly]
strategy:
matrix:
scheme : [minimal, basic] #, small, context, gust, medium, tetex, full]
include:
- scheme: minimal
source: infraonly
- scheme: basic
source: minimal
fail-fast: true
max-parallel: 1
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
- name: Build ${{matrix.scheme}}
2020-03-28 19:06:24 +01:00
working-directory: ./ctan
run: docker build -t ${{secrets.DOCKERHUB_USER}}/latex:${{matrix.scheme}} --build-arg SOURCE=${{matrix.source}} --build-arg SCHEME=${{matrix.scheme}} .
- name: Upload ${{ matrix.scheme }}
run: docker push ${{secrets.DOCKERHUB_USER}}/latex:minimal
2020-03-28 19:06:24 +01:00
- name: Tag as latest
if: matrix.isLatest
2020-03-28 20:28:02 +01:00
run: |
docker tag ${{secrets.DOCKERHUB_USER}}/latex:full ${{secrets.DOCKERHUB_USER}}/latex:latest
docker push ${{secrets.DOCKERHUB_USER}}/latex:latest