Skip to content

.github/workflows/deploy_images_c7.yml #7

.github/workflows/deploy_images_c7.yml

.github/workflows/deploy_images_c7.yml #7

name: Deploy images CentOS7
on:
workflow_dispatch:
inputs:
push_image:
description: "Push to DockerHub"
type: boolean
default: false
specific_job:
description: "Specific job to run"
type: choice
default: none
options:
- 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:
if: ${{ github.event.inputs.specific_job == 'none' || contains(github.event.inputs.specific_job, 'py27') }}
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Build and deploy image 🐳
uses: docker/build-push-action@v1
with:
path: docker
dockerfile: docker/Dockerfile_centos7_py27
repository: riga/law
tags: c7-py27,py27,py2
push: ${{ github.event.inputs.build_only != 'true' }}
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
# still existing for legacy support, to be removed soon
c7-py36:
if: ${{ github.event.inputs.specific_job == 'none' || contains(github.event.inputs.specific_job, 'py36') }}
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Build and deploy image 🐳
uses: docker/build-push-action@v1
with:
path: docker
dockerfile: docker/Dockerfile_centos7_py36
repository: riga/law
tags: c7-py36,py36
push: ${{ github.event.inputs.build_only != 'true' }}
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
c7-py37:
if: ${{ github.event.inputs.specific_job == 'none' || contains(github.event.inputs.specific_job, 'py37') }}
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Build and deploy image 🐳
uses: ./.github/actions/build-image
with:
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' }}
c7-py38:
if: ${{ github.event.inputs.specific_job == 'none' || contains(github.event.inputs.specific_job, 'py38') }}
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Build and deploy image 🐳
uses: ./.github/actions/build-image
with:
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' }}
c7-py39:
if: ${{ github.event.inputs.specific_job == 'none' || contains(github.event.inputs.specific_job, 'py39') }}
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Build and deploy image 🐳
uses: ./.github/actions/build-image
with:
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' }}
c7-py310:
if: ${{ github.event.inputs.specific_job == 'none' || contains(github.event.inputs.specific_job, 'py310') }}
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Build and deploy image 🐳
uses: ./.github/actions/build-image
with:
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' }}