From 58b2da8aebcc15bf8a18ba3f18960139c401f13b Mon Sep 17 00:00:00 2001 From: Marcel Schwarz Date: Sun, 29 Mar 2020 18:34:15 +0200 Subject: [PATCH] Merge infraonly with scratch-build --- .github/workflows/main.yml | 54 ++++++++++++-------------------------- 1 file changed, 17 insertions(+), 37 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0424449..5be2637 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -8,29 +8,28 @@ on: - cron: 0 18 * * * jobs: - build-infraonly: + build-scratch: runs-on: ubuntu-latest + strategy: + matrix: + scheme: [infraonly, 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 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 + - uses: actions/checkout@v2 - - name: Upload infraonly image - run: | - docker tag ${{secrets.DOCKERHUB_USER}}/latex:infraonly-incremental ${{secrets.DOCKERHUB_USER}}/latex:infraonly - docker push ${{secrets.DOCKERHUB_USER}}/latex:infraonly + - 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 build-incremental: runs-on: ubuntu-latest - needs: [build-infraonly] + needs: [build-scratch] strategy: max-parallel: 1 fail-fast: true @@ -78,23 +77,4 @@ jobs: run: | docker tag ${{secrets.DOCKERHUB_USER}}/latex:${{matrix.scheme}}-incremental ${{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 \ No newline at end of file + \ No newline at end of file