forked from dbt-msft/dbt-sqlserver
-
Notifications
You must be signed in to change notification settings - Fork 1
70 lines (64 loc) · 1.99 KB
/
publish-docker.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
---
name: Publish Docker images for CI/CD
on: # yamllint disable-line rule:truthy
push:
paths:
- 'devops/**'
- '.github/workflows/publish-docker.yml'
branches:
- 'master'
jobs:
publish-docker-client:
strategy:
matrix:
python_version: ["3.7", "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@v3
- name: Log in to the Container registry
uses: docker/login-action@v2.1.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v4.0.0
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 }}
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@v3
- name: Log in to the Container registry
uses: docker/login-action@v2.1.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v4.0.0
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 }}