71 lines
2.1 KiB
YAML
71 lines
2.1 KiB
YAML
name: Deploy
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
- github-actions
|
|
schedule:
|
|
- cron: 0 18 * * *
|
|
|
|
jobs:
|
|
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
|
|
working-directory: ./ctan
|
|
run: docker build -t ${{secrets.DOCKERHUB_USER}}/latex:infraonly -f Dockerfile.infraonly .
|
|
|
|
- name: Upload infraonly image
|
|
run: docker push ${{secrets.DOCKERHUB_USER}}/latex:infraonly
|
|
|
|
build-incremental:
|
|
runs-on: ubuntu-latest
|
|
needs: [build-infraonly]
|
|
strategy:
|
|
max-parallel: 1
|
|
matrix:
|
|
scheme : [minimal, basic, small, context, gust, medium, tetex, full]
|
|
include:
|
|
- scheme: minimal
|
|
source: infraonly
|
|
- scheme: basic
|
|
source: minimal
|
|
- scheme: small
|
|
source: basic
|
|
- scheme: context
|
|
source: small
|
|
- scheme: gust
|
|
source: context
|
|
- scheme: medium
|
|
source: gust
|
|
- scheme: tetex
|
|
source: medium
|
|
- scheme: full
|
|
source: tetex
|
|
isLatest: true
|
|
|
|
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}}
|
|
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
|
|
|
|
- name: Tag as latest
|
|
if: matrix.isLatest
|
|
run: |
|
|
docker tag ${{secrets.DOCKERHUB_USER}}/latex:${{matrix.scheme}} ${{secrets.DOCKERHUB_USER}}/latex:latest
|
|
docker push ${{secrets.DOCKERHUB_USER}}/latex:latest
|