83 lines
3.3 KiB
YAML
83 lines
3.3 KiB
YAML
# 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:
|
|
build-infraonly:
|
|
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
|
|
|
|
- name: Build infraonly
|
|
run: docker build -t ${{secrets.DOCKERHUB_USER}}/latex:infraonly -f ctan/Dockerfile.infraonly .
|
|
|
|
- name: Upload infraonly image
|
|
run: docker push ${{secrets.DOCKERHUB_USER}}/latex:infraonly
|
|
|
|
build-incremental:
|
|
runs-on: ubuntu-latest
|
|
needs: [build-infraonly]
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Login to Dockerhub
|
|
run: echo ${{secrets.DOCKERHUB_PASSWORD}} | docker login -u ${{secrets.DOCKERHUB_USER}} --password-stdin
|
|
|
|
- name: Build minimal
|
|
working-directory: ./ctan
|
|
run: docker build -t ${{secrets.DOCKERHUB_USER}}/latex:minimal --build-arg SOURCE=infraonly --build-arg SCHEME=minimal .
|
|
|
|
- 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
|
|
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
|
|
|
|
- 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
|
|
docker push ${{secrets.DOCKERHUB_USER}}/latex:latest
|