2024-10-30 00:42:32 +00:00
|
|
|
name: Build Docker Base Image
|
|
|
|
|
|
|
|
on:
|
2024-10-30 04:53:00 +00:00
|
|
|
push:
|
|
|
|
paths:
|
|
|
|
- 'Dockerfile.builder'
|
|
|
|
- 'Dockerfile.runtime'
|
|
|
|
- 'install_dependencies.sh'
|
|
|
|
- '.github/workflows/build-base-image.yml'
|
2024-10-30 04:53:45 +00:00
|
|
|
- 'pyproject.toml'
|
2024-10-30 00:42:32 +00:00
|
|
|
workflow_dispatch:
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build-image:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
if: github.event_name != 'pull_request'
|
|
|
|
steps:
|
2024-10-30 03:11:33 +00:00
|
|
|
- uses: actions/checkout@v4
|
2024-10-30 00:42:32 +00:00
|
|
|
- name: Set up QEMU
|
|
|
|
uses: docker/setup-qemu-action@v2
|
|
|
|
- name: Set up Docker Buildx
|
|
|
|
uses: docker/setup-buildx-action@v2
|
|
|
|
- name: Login to Docker Hub
|
|
|
|
uses: docker/login-action@v2
|
|
|
|
with:
|
|
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
2024-10-30 05:14:23 +00:00
|
|
|
|
2024-10-30 01:50:22 +00:00
|
|
|
- name: Build and push runtime
|
2024-10-30 00:42:32 +00:00
|
|
|
uses: docker/build-push-action@v4
|
|
|
|
with:
|
|
|
|
context: .
|
2024-10-30 01:50:22 +00:00
|
|
|
file: ./Dockerfile.runtime
|
2024-10-30 08:08:22 +00:00
|
|
|
platforms: linux/amd64, linux/arm64, linux/arm/v7
|
2024-10-30 00:42:32 +00:00
|
|
|
push: true
|
2024-10-31 01:29:35 +00:00
|
|
|
tags: ${{ secrets.DOCKERHUB_USERNAME }}/xiaomusic:runtime
|
2024-10-30 10:50:26 +00:00
|
|
|
|
2024-10-30 01:50:22 +00:00
|
|
|
- name: Build and push builder
|
|
|
|
uses: docker/build-push-action@v4
|
|
|
|
with:
|
|
|
|
context: .
|
|
|
|
file: ./Dockerfile.builder
|
2024-10-30 06:27:44 +00:00
|
|
|
platforms: linux/amd64, linux/arm64, linux/arm/v7
|
2024-10-30 01:50:22 +00:00
|
|
|
push: true
|
2024-10-31 01:29:35 +00:00
|
|
|
tags: ${{ secrets.DOCKERHUB_USERNAME }}/xiaomusic:builder
|
2024-10-30 11:51:10 +00:00
|
|
|
|