2020-11-13 14:32:18 -05:00
|
|
|
name: Docker
|
|
|
|
|
2020-11-27 04:38:38 -05:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- 'master'
|
|
|
|
pull_request:
|
2021-01-21 19:10:17 -05:00
|
|
|
types: [synchronize, opened, reopened, ready_for_review]
|
2020-11-13 14:32:18 -05:00
|
|
|
|
2024-01-31 02:03:25 -05:00
|
|
|
concurrency:
|
|
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
|
|
|
|
cancel-in-progress: true
|
|
|
|
|
2020-11-13 14:32:18 -05:00
|
|
|
jobs:
|
2023-04-14 11:23:00 -04:00
|
|
|
docker-build:
|
2021-02-06 19:25:46 -05:00
|
|
|
name: docker-build
|
2020-11-13 14:32:18 -05:00
|
|
|
runs-on: ubuntu-latest
|
2024-01-23 16:44:07 -05:00
|
|
|
strategy:
|
|
|
|
matrix:
|
2024-01-31 02:03:25 -05:00
|
|
|
build_preset: ["dev", "lean", "py310", "websocket", "dockerize"]
|
2024-01-23 16:44:07 -05:00
|
|
|
platform: ["linux/amd64", "linux/arm64"]
|
2024-01-23 23:30:53 -05:00
|
|
|
exclude:
|
|
|
|
# disabling because slow! no python wheels for arm/py39 and
|
|
|
|
# QEMU is slow!
|
2024-01-31 02:03:25 -05:00
|
|
|
- build_preset: "dev"
|
2024-01-23 23:30:53 -05:00
|
|
|
platform: "linux/arm64"
|
2024-01-31 02:03:25 -05:00
|
|
|
- build_preset: "lean"
|
2024-01-23 23:30:53 -05:00
|
|
|
platform: "linux/arm64"
|
2024-01-23 16:44:07 -05:00
|
|
|
fail-fast: false
|
2020-11-13 14:32:18 -05:00
|
|
|
steps:
|
2021-01-24 02:10:16 -05:00
|
|
|
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
|
2024-01-23 16:44:07 -05:00
|
|
|
uses: actions/checkout@v4
|
2021-01-24 02:10:16 -05:00
|
|
|
with:
|
|
|
|
persist-credentials: false
|
2024-01-23 16:44:07 -05:00
|
|
|
|
2023-09-25 16:08:21 -04:00
|
|
|
- name: Set up QEMU
|
2024-01-23 16:44:07 -05:00
|
|
|
uses: docker/setup-qemu-action@v3
|
|
|
|
|
2023-09-25 16:08:21 -04:00
|
|
|
- name: Set up Docker Buildx
|
2024-01-23 16:44:07 -05:00
|
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
|
|
|
|
- name: Build Docker Image
|
|
|
|
shell: bash
|
2020-11-13 14:32:18 -05:00
|
|
|
env:
|
|
|
|
DOCKERHUB_USER: ${{ secrets.DOCKERHUB_USER }}
|
|
|
|
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
|
|
run: |
|
2024-01-31 02:03:25 -05:00
|
|
|
pip install click
|
|
|
|
./scripts/build_docker.py ${{ matrix.build_preset }} ${{ github.event_name }} --platform ${{ matrix.platform }}
|