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:
|
|
|
|
create-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
|
|
|
|
|
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
|
|
|
|
|
|
|
create-minimal:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs: [create-infraonly]
|
|
|
|
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 18:38:29 +01:00
|
|
|
|
2020-03-28 18:55:08 +01:00
|
|
|
- name: Upload minimal image
|
2020-03-28 18:38:29 +01:00
|
|
|
run: docker push ${{secrets.DOCKERHUB_USER}}/latex:minimal
|