Skip to content

Commit

Permalink
Split image workflows, add a9 37 test.
Browse files Browse the repository at this point in the history
  • Loading branch information
riga committed Nov 5, 2023
1 parent 210aeb6 commit 65e6b32
Show file tree
Hide file tree
Showing 4 changed files with 307 additions and 164 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/deploy_images_a9.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Deploy images AlmaLinux 9

on:
workflow_dispatch:
inputs:
build_only:
description: Build only? (true|false)
required: false
default: 'false'
specific_job:
description: Run a specific job? (c8-py37)
required: false
default: ''

jobs:
a9-py37:
if: ${{ github.event.inputs.specific_job == '' || contains(github.event.inputs.specific_job, 'a9-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_alma9_py37
platforms: linux/amd64,linux/arm64
push: ${{ github.event.inputs.build_only != 'true' }}
tags: riga/law:a9-py37
176 changes: 176 additions & 0 deletions .github/workflows/deploy_images_c7.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,176 @@
name: Deploy images CentOS7

on:
workflow_dispatch:
inputs:
build_only:
description: Build only? (true|false)
required: false
default: 'false'
specific_job:
description: Run a specific job? (c7-py27|c7-py36|c7-py37|c7-py38|c7-py39|c7-py310)
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
Loading

0 comments on commit 65e6b32

Please sign in to comment.