-
Notifications
You must be signed in to change notification settings - Fork 19
51 lines (43 loc) · 1.35 KB
/
build-docker.yml
File metadata and controls
51 lines (43 loc) · 1.35 KB
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
name: docker
on:
workflow_dispatch: # allows manual trigger
push:
tags:
- 'v*'
branches:
- 'docker'
jobs:
docker:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8.20, 3.9.19, 3.10.14, 3.11.9, 3.12.4, 3.14.3]
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Create multiarch builder
run: |
docker buildx create --name multiarch-builder --use
docker buildx inspect --bootstrap
- name: Print GitHub context
run: |
echo "Building for Python ${{ matrix.python-version }}"
echo "Ref Name: ${{ github.ref_name }}"
echo "SHA: ${{ github.sha }}"
- name: Build and push multi-arch image
uses: docker/build-push-action@v5
with:
context: .
push: true
platforms: linux/amd64 #linux/amd64,linux/arm64
build-args: |
PYTHON_VERSION=${{ matrix.python-version }}
tags: |
cassiopee486/cassiopee:${{ github.ref_name }}-py${{ matrix.python-version }}