mirror of
https://github.com/qurator-spk/ocrd-galley.git
synced 2025-07-28 14:19:52 +02:00
🚧 github: Use a matrix build to DRY
This commit is contained in:
parent
f79551b485
commit
2e027d015d
1 changed files with 6 additions and 14 deletions
20
.github/workflows/build.yml
vendored
20
.github/workflows/build.yml
vendored
|
@ -10,6 +10,9 @@ on:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
docker:
|
docker:
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
subimage: ["core", "dinglehopper"] # core images need to come first!
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
-
|
-
|
||||||
|
@ -23,7 +26,6 @@ jobs:
|
||||||
uses: docker/setup-buildx-action@v2
|
uses: docker/setup-buildx-action@v2
|
||||||
|
|
||||||
# TODO data
|
# TODO data
|
||||||
# TODO matrix for all Dockerfiles
|
|
||||||
-
|
-
|
||||||
name: Login to Docker Hub
|
name: Login to Docker Hub
|
||||||
uses: docker/login-action@v2
|
uses: docker/login-action@v2
|
||||||
|
@ -31,22 +33,12 @@ jobs:
|
||||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
-
|
-
|
||||||
name: Build core
|
name: Build ${{ matrix.subimage }}
|
||||||
uses: docker/build-push-action@v4
|
uses: docker/build-push-action@v4
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
file: Dockerfile-core
|
file: Dockerfile-${{ matrix.subimage }}
|
||||||
build-args:
|
build-args:
|
||||||
DRONE_COMMIT=${{ github.sha }}
|
DRONE_COMMIT=${{ github.sha }}
|
||||||
push: true
|
push: true
|
||||||
tags: quratorspk/ocrd-galley-core:${{ github.sha }}
|
tags: quratorspk/ocrd-galley-${{ matrix.subimage }}:${{ github.sha }}
|
||||||
-
|
|
||||||
name: Build dinglehopper
|
|
||||||
uses: docker/build-push-action@v4
|
|
||||||
with:
|
|
||||||
context: .
|
|
||||||
file: Dockerfile-dinglehopper
|
|
||||||
build-args:
|
|
||||||
DRONE_COMMIT=${{ github.sha }}
|
|
||||||
push: true
|
|
||||||
tags: quratorspk/ocrd-galley-dinglehopper:${{ github.sha }}
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue