Skip to content

Add GitHub workflows for integration, unit testing, and Docker image … #1

Add GitHub workflows for integration, unit testing, and Docker image …

Add GitHub workflows for integration, unit testing, and Docker image … #1

---
name: Patched Publish Docker images for CI/CD
on: # yamllint disable-line rule:truthy
push:
paths:
- 'devops/**'
- '.github/workflows/publish-docker.yml'
branches:
- 'patched'
jobs:
patched-publish-docker-client:
strategy:
matrix:
python_version: ["3.9", "3.10", "3.11", "3.12"]
docker_target: ["msodbc17", "msodbc18"]
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Log in to the Container registry
uses: docker/[email protected]
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/[email protected]
with:
context: devops
build-args: PYTHON_VERSION=${{ matrix.python_version }}
file: devops/CI.Dockerfile
push: true
platforms: linux/amd64
target: ${{ matrix.docker_target }}
tags: ghcr.io/${{ github.repository }}:CI-${{ matrix.python_version }}-${{ matrix.docker_target }}
patched-publish-docker-server:
strategy:
matrix:
mssql_version: ["2017", "2019", "2022"]
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Log in to the Container registry
uses: docker/[email protected]
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/[email protected]
with:
context: devops
build-args: MSSQL_VERSION=${{ matrix.mssql_version }}
file: devops/server.Dockerfile
push: true
platforms: linux/amd64
tags: ghcr.io/${{ github.repository }}:server-${{ matrix.mssql_version }}