latex/.github/workflows/main.yml

83 lines
3.3 KiB
YAML
Raw Normal View History

2020-03-28 18:30:36 +01:00
# This is a basic workflow to help you get started with Actions
name: CI
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches:
- master
- github-actions
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
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 # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- 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
2020-03-28 18:32:25 +01:00
run: docker build -t ${{secrets.DOCKERHUB_USER}}/latex:infraonly -f ctan/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]
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-28 18:55:08 +01:00
- name: Build minimal
working-directory: ./ctan
run: docker build -t ${{secrets.DOCKERHUB_USER}}/latex:minimal --build-arg SOURCE=infraonly --build-arg SCHEME=minimal .
2020-03-28 19:06:24 +01:00
- name: Build basic
working-directory: ./ctan
run: docker build -t ${{secrets.DOCKERHUB_USER}}/latex:basic --build-arg SOURCE=minimal --build-arg SCHEME=basic .
- name: Build small
working-directory: ./ctan
run: docker build -t ${{secrets.DOCKERHUB_USER}}/latex:small --build-arg SOURCE=basic --build-arg SCHEME=small .
- name: Build context
working-directory: ./ctan
run: docker build -t ${{secrets.DOCKERHUB_USER}}/latex:context --build-arg SOURCE=small --build-arg SCHEME=context .
- name: Build gust
working-directory: ./ctan
run: docker build -t ${{secrets.DOCKERHUB_USER}}/latex:gust --build-arg SOURCE=context --build-arg SCHEME=gust .
- name: Build medium
working-directory: ./ctan
run: docker build -t ${{secrets.DOCKERHUB_USER}}/latex:medium --build-arg SOURCE=gust --build-arg SCHEME=medium .
- name: Build tetex
working-directory: ./ctan
run: docker build -t ${{secrets.DOCKERHUB_USER}}/latex:tetex --build-arg SOURCE=medium --build-arg SCHEME=tetex .
- name: Build full
working-directory: ./ctan
2020-03-28 20:28:02 +01:00
run: |
docker build -t ${{secrets.DOCKERHUB_USER}}/latex:full --build-arg SOURCE=tetex --build-arg SCHEME=full .
docker tag ${{secrets.DOCKERHUB_USER}}/latex:full ${{secrets.DOCKERHUB_USER}}/latex:latest
2020-03-28 18:38:29 +01:00
2020-03-28 19:06:24 +01:00
- name: Upload images
run: |
docker push ${{secrets.DOCKERHUB_USER}}/latex:minimal
docker push ${{secrets.DOCKERHUB_USER}}/latex:basic
docker push ${{secrets.DOCKERHUB_USER}}/latex:small
docker push ${{secrets.DOCKERHUB_USER}}/latex:context
docker push ${{secrets.DOCKERHUB_USER}}/latex:gust
docker push ${{secrets.DOCKERHUB_USER}}/latex:medium
docker push ${{secrets.DOCKERHUB_USER}}/latex:tetex
docker push ${{secrets.DOCKERHUB_USER}}/latex:full
2020-03-28 20:28:02 +01:00
docker push ${{secrets.DOCKERHUB_USER}}/latex:latest