Skip to content

Commit

Permalink
Make image platforms configurable.
Browse files Browse the repository at this point in the history
  • Loading branch information
riga committed Nov 5, 2023
1 parent a320169 commit 449add7
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 10 deletions.
23 changes: 19 additions & 4 deletions .github/workflows/deploy_images_a9.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,32 @@ on:
workflow_dispatch:
inputs:
push_image:
description: "Push to DockerHub"
description: Push to DockerHub
type: boolean
default: false

specific_job:
description: "Specific job to run"
description: Specific job to run
type: choice
default: "none"
default: none
options:
- "none"
- none
- py37
- py38
- py39
- py310
- py311
- example

platforms:
description: Platforms to build for
type: choice
default: linux/amd64,linux/arm64
options:
- linux/amd64,linux/arm64
- linux/amd64
- linux/arm64

jobs:
a9-py37:
if: ${{ github.event.inputs.specific_job == 'none' || contains(github.event.inputs.specific_job, 'py37') }}
Expand All @@ -37,6 +46,7 @@ jobs:
dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }}
dockerhub_token: ${{ secrets.DOCKERHUB_TOKEN }}
docker_file: docker/Dockerfile_alma9_py37
platforms: ${{ github.event.inputs.platforms }}
tags: riga/law:a9-py37,riga/law:py37
push_image: ${{ github.event.inputs.push_image == 'true' }}

Expand All @@ -55,6 +65,7 @@ jobs:
dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }}
dockerhub_token: ${{ secrets.DOCKERHUB_TOKEN }}
docker_file: docker/Dockerfile_alma9_py38
platforms: ${{ github.event.inputs.platforms }}
tags: riga/law:a9-py38,riga/law:py38
push_image: ${{ github.event.inputs.push_image == 'true' }}

Expand All @@ -73,6 +84,7 @@ jobs:
dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }}
dockerhub_token: ${{ secrets.DOCKERHUB_TOKEN }}
docker_file: docker/Dockerfile_alma9_py39
platforms: ${{ github.event.inputs.platforms }}
tags: riga/law:a9-py39,riga/law:py39
push_image: ${{ github.event.inputs.push_image == 'true' }}

Expand All @@ -91,6 +103,7 @@ jobs:
dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }}
dockerhub_token: ${{ secrets.DOCKERHUB_TOKEN }}
docker_file: docker/Dockerfile_alma9_py310
platforms: ${{ github.event.inputs.platforms }}
tags: riga/law:a9-py310,riga/law:py310
push_image: ${{ github.event.inputs.push_image == 'true' }}

Expand All @@ -109,6 +122,7 @@ jobs:
dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }}
dockerhub_token: ${{ secrets.DOCKERHUB_TOKEN }}
docker_file: docker/Dockerfile_alma9_py311
platforms: ${{ github.event.inputs.platforms }}
tags: riga/law:a9-py311,riga/law:a9-py3,riga/law:a9,riga/law:py311,riga/law:py3,riga/law:latest
push_image: ${{ github.event.inputs.push_image == 'true' }}

Expand All @@ -128,5 +142,6 @@ jobs:
dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }}
dockerhub_token: ${{ secrets.DOCKERHUB_TOKEN }}
docker_file: docker/Dockerfile_example
platforms: ${{ github.event.inputs.platforms }}
tags: riga/law:example
push_image: true
17 changes: 15 additions & 2 deletions .github/workflows/deploy_images_c7.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,25 @@ on:
specific_job:
description: "Specific job to run"
type: choice
default: "none"
default: none
options:
- "none"
- none
- py27
- py36
- py37
- py38
- py39
- py310

platforms:
description: Platforms to build for
type: choice
default: linux/amd64,linux/arm64
options:
- linux/amd64,linux/arm64
- linux/amd64
- linux/arm64

jobs:
# still existing for legacy support, to be removed soon
c7-py27:
Expand Down Expand Up @@ -79,6 +88,7 @@ jobs:
dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }}
dockerhub_token: ${{ secrets.DOCKERHUB_TOKEN }}
docker_file: docker/Dockerfile_centos7_py37
platforms: ${{ github.event.inputs.platforms }}
tags: riga/law:c7-py37
push_image: ${{ github.event.inputs.push_image == 'true' }}

Expand All @@ -97,6 +107,7 @@ jobs:
dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }}
dockerhub_token: ${{ secrets.DOCKERHUB_TOKEN }}
docker_file: docker/Dockerfile_centos7_py38
platforms: ${{ github.event.inputs.platforms }}
tags: riga/law:c7-py38
push_image: ${{ github.event.inputs.push_image == 'true' }}

Expand All @@ -115,6 +126,7 @@ jobs:
dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }}
dockerhub_token: ${{ secrets.DOCKERHUB_TOKEN }}
docker_file: docker/Dockerfile_centos7_py39
platforms: ${{ github.event.inputs.platforms }}
tags: riga/law:c7-py39
push_image: ${{ github.event.inputs.push_image == 'true' }}

Expand All @@ -133,5 +145,6 @@ jobs:
dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }}
dockerhub_token: ${{ secrets.DOCKERHUB_TOKEN }}
docker_file: docker/Dockerfile_centos7_py310
platforms: ${{ github.event.inputs.platforms }}
tags: riga/law:c7-py310,riga/law:c7-py3,riga/law:c7
push_image: ${{ github.event.inputs.push_image == 'true' }}
22 changes: 18 additions & 4 deletions .github/workflows/deploy_images_c8.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,31 @@ on:
workflow_dispatch:
inputs:
push_image:
description: "Push to DockerHub"
description: Push to DockerHub
type: boolean
default: false

specific_job:
description: "Specific job to run"
description: Specific job to run
type: choice
default: "none"
default: none
options:
- "none"
- none
- py37
- py38
- py39
- py310
- py311

platforms:
description: Platforms to build for
type: choice
default: linux/amd64,linux/arm64
options:
- linux/amd64,linux/arm64
- linux/amd64
- linux/arm64

jobs:
c8-py37:
if: ${{ github.event.inputs.specific_job == 'none' || contains(github.event.inputs.specific_job, 'py37') }}
Expand All @@ -36,6 +45,7 @@ jobs:
dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }}
dockerhub_token: ${{ secrets.DOCKERHUB_TOKEN }}
docker_file: docker/Dockerfile_centos8_py37
platforms: ${{ github.event.inputs.platforms }}
tags: riga/law:c8-py37
push_image: ${{ github.event.inputs.push_image == 'true' }}

Expand All @@ -54,6 +64,7 @@ jobs:
dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }}
dockerhub_token: ${{ secrets.DOCKERHUB_TOKEN }}
docker_file: docker/Dockerfile_centos8_py38
platforms: ${{ github.event.inputs.platforms }}
tags: riga/law:c8-py38
push_image: ${{ github.event.inputs.push_image == 'true' }}

Expand All @@ -72,6 +83,7 @@ jobs:
dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }}
dockerhub_token: ${{ secrets.DOCKERHUB_TOKEN }}
docker_file: docker/Dockerfile_centos8_py39
platforms: ${{ github.event.inputs.platforms }}
tags: riga/law:c8-py39
push_image: ${{ github.event.inputs.push_image == 'true' }}

Expand All @@ -90,6 +102,7 @@ jobs:
dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }}
dockerhub_token: ${{ secrets.DOCKERHUB_TOKEN }}
docker_file: docker/Dockerfile_centos8_py310
platforms: ${{ github.event.inputs.platforms }}
tags: riga/law:c8-py310
push_image: ${{ github.event.inputs.push_image == 'true' }}

Expand All @@ -108,5 +121,6 @@ jobs:
dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }}
dockerhub_token: ${{ secrets.DOCKERHUB_TOKEN }}
docker_file: docker/Dockerfile_centos8_py311
platforms: ${{ github.event.inputs.platforms }}
tags: riga/law:c8-py311,riga/law:c8-py3,riga/law:c8
push_image: ${{ github.event.inputs.push_image == 'true' }}

0 comments on commit 449add7

Please sign in to comment.