Use Matrix build strategy, Remove comments
This commit is contained in:
parent
b64a12a638
commit
0b85e12866
67
.github/workflows/main.yml
vendored
67
.github/workflows/main.yml
vendored
@ -1,27 +1,23 @@
|
||||
# This is a basic workflow to help you get started with Actions
|
||||
name: Deploy
|
||||
|
||||
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
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- 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 .
|
||||
working-directory: ./ctan
|
||||
run: docker build -t ${{secrets.DOCKERHUB_USER}}/latex:infraonly -f Dockerfile.infraonly .
|
||||
|
||||
- name: Upload infraonly image
|
||||
run: docker push ${{secrets.DOCKERHUB_USER}}/latex:infraonly
|
||||
@ -29,54 +25,31 @@ jobs:
|
||||
build-incremental:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [build-infraonly]
|
||||
strategy:
|
||||
matrix:
|
||||
scheme : [minimal, basic] #, small, context, gust, medium, tetex, full]
|
||||
include:
|
||||
- scheme: minimal
|
||||
source: infraonly
|
||||
- scheme: basic
|
||||
source: minimal
|
||||
fail-fast: true
|
||||
max-parallel: 1
|
||||
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
|
||||
- name: Build ${{matrix.scheme}}
|
||||
working-directory: ./ctan
|
||||
run: docker build -t ${{secrets.DOCKERHUB_USER}}/latex:minimal --build-arg SOURCE=infraonly --build-arg SCHEME=minimal .
|
||||
run: docker build -t ${{secrets.DOCKERHUB_USER}}/latex:${{matrix.scheme}} --build-arg SOURCE=${{matrix.source}} --build-arg SCHEME=${{matrix.scheme}} .
|
||||
|
||||
- name: Build basic
|
||||
working-directory: ./ctan
|
||||
run: docker build -t ${{secrets.DOCKERHUB_USER}}/latex:basic --build-arg SOURCE=minimal --build-arg SCHEME=basic .
|
||||
- name: Upload ${{ matrix.scheme }}
|
||||
run: docker push ${{secrets.DOCKERHUB_USER}}/latex:minimal
|
||||
|
||||
- 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
|
||||
- name: Tag as latest
|
||||
if: matrix.isLatest
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user