Deploy images #85
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy images | |
on: | |
workflow_dispatch: | |
inputs: | |
build_only: | |
description: Build only? (true|false) | |
required: false | |
default: 'false' | |
specific_job: | |
description: Run a specific job? (c8-py37|c8-py38|c8-py39|c8-py310|c8-py311|c8-py312|c7-py27|c7-py36|c7-py37|c7-py38|c7-py39|c7-py310|example) | |
required: false | |
default: '' | |
jobs: | |
# still existing for legacy support, to be removed soon | |
c7-py27: | |
if: ${{ github.event.inputs.specific_job == '' || contains(github.event.inputs.specific_job, 'c7-py27') }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout 🛎️ | |
uses: actions/checkout@v3 | |
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 == '' || contains(github.event.inputs.specific_job, 'c7-py36') }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout 🛎️ | |
uses: actions/checkout@v3 | |
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 == '' || contains(github.event.inputs.specific_job, 'c7-py37') }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout 🛎️ | |
uses: actions/checkout@v3 | |
with: | |
persist-credentials: false | |
- name: Set up QEMU 🌈 | |
uses: docker/setup-qemu-action@v2 | |
- name: Set up Docker Buildx ✨ | |
uses: docker/setup-buildx-action@v2 | |
- name: Login to Docker Hub 🎪 | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build and deploy image 🐳 | |
uses: docker/build-push-action@v4 | |
with: | |
context: docker | |
file: docker/Dockerfile_centos7_py37 | |
platforms: linux/amd64,linux/arm64 | |
push: ${{ github.event.inputs.build_only != 'true' }} | |
tags: riga/law:c7-py37 | |
c7-py38: | |
if: ${{ github.event.inputs.specific_job == '' || contains(github.event.inputs.specific_job, 'c7-py38') }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout 🛎️ | |
uses: actions/checkout@v3 | |
with: | |
persist-credentials: false | |
- name: Set up QEMU 🌈 | |
uses: docker/setup-qemu-action@v2 | |
- name: Set up Docker Buildx ✨ | |
uses: docker/setup-buildx-action@v2 | |
- name: Login to Docker Hub 🎪 | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build and deploy image 🐳 | |
uses: docker/build-push-action@v4 | |
with: | |
context: docker | |
file: docker/Dockerfile_centos7_py38 | |
platforms: linux/amd64,linux/arm64 | |
push: ${{ github.event.inputs.build_only != 'true' }} | |
tags: riga/law:c7-py38 | |
c7-py39: | |
if: ${{ github.event.inputs.specific_job == '' || contains(github.event.inputs.specific_job, 'c7-py39') }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout 🛎️ | |
uses: actions/checkout@v3 | |
with: | |
persist-credentials: false | |
- name: Set up QEMU 🌈 | |
uses: docker/setup-qemu-action@v2 | |
- name: Set up Docker Buildx ✨ | |
uses: docker/setup-buildx-action@v2 | |
- name: Login to Docker Hub 🎪 | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build and deploy image 🐳 | |
uses: docker/build-push-action@v4 | |
with: | |
context: docker | |
file: docker/Dockerfile_centos7_py39 | |
platforms: linux/amd64,linux/arm64 | |
push: ${{ github.event.inputs.build_only != 'true' }} | |
tags: riga/law:c7-py39 | |
c7-py310: | |
if: ${{ github.event.inputs.specific_job == '' || contains(github.event.inputs.specific_job, 'c7-py310') }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout 🛎️ | |
uses: actions/checkout@v3 | |
with: | |
persist-credentials: false | |
- name: Set up QEMU 🌈 | |
uses: docker/setup-qemu-action@v2 | |
- name: Set up Docker Buildx ✨ | |
uses: docker/setup-buildx-action@v2 | |
- name: Login to Docker Hub 🎪 | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build and deploy image 🐳 | |
uses: docker/build-push-action@v4 | |
with: | |
context: docker | |
file: docker/Dockerfile_centos7_py310 | |
platforms: linux/amd64,linux/arm64 | |
push: ${{ github.event.inputs.build_only != 'true' }} | |
tags: riga/law:c7-py310 | |
c8-py37: | |
if: ${{ github.event.inputs.specific_job == '' || contains(github.event.inputs.specific_job, 'c8-py37') }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout 🛎️ | |
uses: actions/checkout@v3 | |
with: | |
persist-credentials: false | |
- name: Set up QEMU 🌈 | |
uses: docker/setup-qemu-action@v2 | |
- name: Set up Docker Buildx ✨ | |
uses: docker/setup-buildx-action@v2 | |
- name: Login to Docker Hub 🎪 | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build and deploy image 🐳 | |
uses: docker/build-push-action@v4 | |
with: | |
context: docker | |
file: docker/Dockerfile_centos8_py37 | |
platforms: linux/amd64,linux/arm64 | |
push: ${{ github.event.inputs.build_only != 'true' }} | |
tags: riga/law:c8-py37,riga/law:py37 | |
c8-py38: | |
if: ${{ github.event.inputs.specific_job == '' || contains(github.event.inputs.specific_job, 'c8-py38') }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout 🛎️ | |
uses: actions/checkout@v3 | |
with: | |
persist-credentials: false | |
- name: Set up QEMU 🌈 | |
uses: docker/setup-qemu-action@v2 | |
- name: Set up Docker Buildx ✨ | |
uses: docker/setup-buildx-action@v2 | |
- name: Login to Docker Hub 🎪 | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build and deploy image 🐳 | |
uses: docker/build-push-action@v4 | |
with: | |
context: docker | |
file: docker/Dockerfile_centos8_py38 | |
platforms: linux/amd64,linux/arm64 | |
push: ${{ github.event.inputs.build_only != 'true' }} | |
tags: riga/law:c8-py38,riga/law:py38 | |
c8-py39: | |
if: ${{ github.event.inputs.specific_job == '' || contains(github.event.inputs.specific_job, 'c8-py39') }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout 🛎️ | |
uses: actions/checkout@v3 | |
with: | |
persist-credentials: false | |
- name: Set up QEMU 🌈 | |
uses: docker/setup-qemu-action@v2 | |
- name: Set up Docker Buildx ✨ | |
uses: docker/setup-buildx-action@v2 | |
- name: Login to Docker Hub 🎪 | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build and deploy image 🐳 | |
uses: docker/build-push-action@v4 | |
with: | |
context: docker | |
file: docker/Dockerfile_centos8_py39 | |
platforms: linux/amd64,linux/arm64 | |
push: ${{ github.event.inputs.build_only != 'true' }} | |
tags: riga/law:c8-py39,riga/law:py39 | |
c8-py310: | |
if: ${{ github.event.inputs.specific_job == '' || contains(github.event.inputs.specific_job, 'c8-py310') }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout 🛎️ | |
uses: actions/checkout@v3 | |
with: | |
persist-credentials: false | |
- name: Set up QEMU 🌈 | |
uses: docker/setup-qemu-action@v2 | |
- name: Set up Docker Buildx ✨ | |
uses: docker/setup-buildx-action@v2 | |
- name: Login to Docker Hub 🎪 | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build and deploy image 🐳 | |
uses: docker/build-push-action@v4 | |
with: | |
context: docker | |
file: docker/Dockerfile_centos8_py310 | |
platforms: linux/amd64,linux/arm64 | |
push: ${{ github.event.inputs.build_only != 'true' }} | |
tags: riga/law:c8-py310,riga/law:c8-py3,riga/law:c8,riga/law:py310,riga/law:py3,riga/law:latest | |
c8-py311: | |
if: ${{ github.event.inputs.specific_job == '' || contains(github.event.inputs.specific_job, 'c8-py311') }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout 🛎️ | |
uses: actions/checkout@v3 | |
with: | |
persist-credentials: false | |
- name: Set up QEMU 🌈 | |
uses: docker/setup-qemu-action@v2 | |
- name: Set up Docker Buildx ✨ | |
uses: docker/setup-buildx-action@v2 | |
- name: Login to Docker Hub 🎪 | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build and deploy image 🐳 | |
uses: docker/build-push-action@v4 | |
with: | |
context: docker | |
file: docker/Dockerfile_centos8_py311 | |
platforms: linux/amd64,linux/arm64 | |
push: ${{ github.event.inputs.build_only != 'true' }} | |
tags: riga/law:c8-py311,riga/law:py311 | |
c8-py312: | |
if: ${{ github.event.inputs.specific_job == '' || contains(github.event.inputs.specific_job, 'c8-py312') }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout 🛎️ | |
uses: actions/checkout@v3 | |
with: | |
persist-credentials: false | |
- name: Set up QEMU 🌈 | |
uses: docker/setup-qemu-action@v2 | |
- name: Set up Docker Buildx ✨ | |
uses: docker/setup-buildx-action@v2 | |
- name: Login to Docker Hub 🎪 | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build and deploy image 🐳 | |
uses: docker/build-push-action@v4 | |
with: | |
context: docker | |
file: docker/Dockerfile_centos8_py312 | |
platforms: linux/amd64,linux/arm64 | |
push: ${{ github.event.inputs.build_only != 'true' }} | |
tags: riga/law:c8-py312,riga/law:py312 | |
example: | |
if: ${{ github.event.inputs.build_only != 'true' && (github.event.inputs.specific_job == '' || contains(github.event.inputs.specific_job, 'example')) }} | |
needs: c8-py310 | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout 🛎️ | |
uses: actions/checkout@v3 | |
with: | |
persist-credentials: false | |
- name: Set up QEMU 🌈 | |
uses: docker/setup-qemu-action@v2 | |
- name: Set up Docker Buildx ✨ | |
uses: docker/setup-buildx-action@v2 | |
- name: Login to Docker Hub 🎪 | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build and deploy image 🐳 | |
uses: docker/build-push-action@v4 | |
with: | |
context: docker | |
file: docker/Dockerfile_example | |
platforms: linux/amd64,linux/arm64 | |
push: true | |
tags: riga/law:example |