Merge pull request #66 from microsoft/v1.6.0 #10
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: Publish Docker images for CI/CD | |
on: # yamllint disable-line rule:truthy | |
push: | |
paths: | |
- 'devops/**' | |
- '.github/workflows/publish-docker.yml' | |
branches: | |
- main | |
- v* | |
jobs: | |
publish-docker-client: | |
strategy: | |
matrix: | |
python_version: ["3.8", "3.9", "3.10", "3.11"] | |
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 }} |