Merge infraonly with scratch-build

This commit is contained in:
Marcel Schwarz 2020-03-29 18:34:15 +02:00
parent ed0cf6ad32
commit 58b2da8aeb

View File

@ -8,29 +8,28 @@ on:
- cron: 0 18 * * * - cron: 0 18 * * *
jobs: jobs:
build-infraonly: build-scratch:
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy:
matrix:
scheme: [infraonly, minimal, basic, small, context, gust, medium, tetex, full]
fail-fast: false
steps: steps:
- uses: actions/checkout@v2 - 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: ./scratch
run: docker build -t ${{secrets.DOCKERHUB_USER}}/latex:infraonly-incremental .
- name: Upload infraonly-incremental image
run: docker push ${{secrets.DOCKERHUB_USER}}/latex:infraonly-incremental
- name: Upload infraonly image - name: Login to Dockerhub
run: | run: echo ${{secrets.DOCKERHUB_PASSWORD}} | docker login -u ${{secrets.DOCKERHUB_USER}} --password-stdin
docker tag ${{secrets.DOCKERHUB_USER}}/latex:infraonly-incremental ${{secrets.DOCKERHUB_USER}}/latex:infraonly
docker push ${{secrets.DOCKERHUB_USER}}/latex:infraonly - name: Build ${{matrix.scheme}} from scratch
working-directory: ./scratch
run: docker build -t ${{secrets.DOCKERHUB_USER}}/latex:${{matrix.scheme}}-scratch --build-arg SCHEME=${{matrix.scheme}}.
- name: Upload ${{matrix.scheme}}-scratch image
run: docker push ${{secrets.DOCKERHUB_USER}}/latex:${{matrix.scheme}}-scratch
build-incremental: build-incremental:
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: [build-infraonly] needs: [build-scratch]
strategy: strategy:
max-parallel: 1 max-parallel: 1
fail-fast: true fail-fast: true
@ -78,23 +77,4 @@ jobs:
run: | run: |
docker tag ${{secrets.DOCKERHUB_USER}}/latex:${{matrix.scheme}}-incremental ${{secrets.DOCKERHUB_USER}}/latex:latest docker tag ${{secrets.DOCKERHUB_USER}}/latex:${{matrix.scheme}}-incremental ${{secrets.DOCKERHUB_USER}}/latex:latest
docker push ${{secrets.DOCKERHUB_USER}}/latex:latest docker push ${{secrets.DOCKERHUB_USER}}/latex:latest
build-scratch:
runs-on: ubuntu-latest
needs: [build-infraonly]
strategy:
matrix:
scheme: [minimal, basic, small, context, gust, medium, tetex, full]
fail-fast: false
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}} from scratch
working-directory: ./scratch
run: docker build -t ${{secrets.DOCKERHUB_USER}}/latex:${{matrix.scheme}}-scratch --build-arg SCHEME=${{matrix.scheme}}.
- name: Upload ${{matrix.scheme}}-scratch image
run: docker push ${{secrets.DOCKERHUB_USER}}/latex:${{matrix.scheme}}-scratch