forked from KeyviDev/keyvi
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpython-dockerimages-cibuildwheel.yml
More file actions
51 lines (49 loc) · 1.67 KB
/
python-dockerimages-cibuildwheel.yml
File metadata and controls
51 lines (49 loc) · 1.67 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: Python Linux docker cibuildwheel
on:
push:
branches: [ master ]
paths:
- 'docker/**'
- '.github/workflows/python-dockerimages-cibuildwheel.yml'
pull_request:
branches: [ master ]
paths:
- 'docker/**'
- '.github/workflows/python-dockerimages-cibuildwheel.yml'
workflow_dispatch:
jobs:
build_docker:
runs-on: ${{ matrix.os }}
strategy:
matrix:
base_image: [many, musl]
os: [ubuntu-24.04, ubuntu-24.04-arm]
steps:
- uses: actions/checkout@v6
- uses: docker/setup-buildx-action@v3
- name: Log in to Docker Hub
if: github.event_name == 'push'
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: Sets platform/arch for arm64
run: |
echo "PLATFORM=linux/arm64" >> $GITHUB_ENV
echo "ARCH=aarch64" >> $GITHUB_ENV
if: matrix.os == 'ubuntu-24.04-arm'
- name: Sets platform/arch for amd64
run: |
echo "PLATFORM=linux/amd64" >> $GITHUB_ENV
echo "ARCH=x86_64" >> $GITHUB_ENV
if: matrix.os == 'ubuntu-24.04'
- name: Build and push ${{ matrix.base_image }}-${{ env.ARCH }} docker image
uses: docker/build-push-action@v6
with:
context: docker/${{ matrix.base_image }}linux-builder-${{ env.ARCH }}
build-contexts: scripts=docker/scripts
cache-from: type=gha
cache-to: type=gha,mode=max
platforms: ${{ env.PLATFORM }}
push: ${{ github.event_name == 'push' }}
tags: keyvidev/${{ matrix.base_image }}linux-builder-${{ env.ARCH }}