A community-maintained Python framework for creating mathematical animations.
Fixed multiplatform builds for docker images in pipeline (#2753)
Benjamin Hackl2c5d6c2e6d92
diff --git a/.github/workflows/publish-docker.yml b/.github/workflows/publish-docker.ymlnew file mode 100644index 000000000..4ca429872--- /dev/null+++ b/.github/workflows/publish-docker.yml@@ -0,0 +1,71 @@+name: Publish Docker Image++on:+ push:+ branches:+ - main+ release:+ types: [released]++jobs:+ docker-latest:+ runs-on: ubuntu-latest+ if: github.event_name != 'release'+ steps:+ - name: Set up QEMU+ uses: docker/setup-qemu-action@v2++ - name: Set up Docker Buildx+ uses: docker/setup-buildx-action@v1++ - name: Login to DockerHub+ uses: docker/login-action@v1+ with:+ username: ${{ secrets.DOCKERHUB_USERNAME }}+ password: ${{ secrets.DOCKERHUB_TOKEN }}++ - name: Build and push+ uses: docker/build-push-action@v3+ with:+ platforms: linux/arm64,linux/amd64+ push: true+ file: docker/Dockerfile+ tags: |+ manimcommunity/manim:latest++ docker-release:+ runs-on: ubuntu-latest+ if: github.event_name == 'release'+ steps:+ - name: Set up QEMU+ uses: docker/setup-qemu-action@v2++ - name: Set up Docker Buildx+ uses: docker/setup-buildx-action@v1++ - name: Login to DockerHub+ uses: docker/login-action@v1+ with:+ username: ${{ secrets.DOCKERHUB_USERNAME }}+ password: ${{ secrets.DOCKERHUB_TOKEN }}++ - name: Get Version+ id: create_release+ shell: python+ env:+ tag_act: ${{ github.ref }}+ run: |+ import os+ ref_tag = os.getenv('tag_act').split('/')[-1]+ print(f"::set-output name=tag_name::{ref_tag}")++ - name: Build and push+ uses: docker/build-push-action@v3+ with:+ platforms: linux/arm64,linux/amd64+ push: true+ file: docker/Dockerfile+ tags: |+ manimcommunity/manim:stable+ manimcommunity/manim:latest+ manimcommunity/manim:${{ steps.create_release.outputs.tag_name }}diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.ymldeleted file mode 100644index 0eef3cfbf..000000000--- a/.github/workflows/publish.yml+++ /dev/null@@ -1,117 +0,0 @@-name: Publish Docker Image--on:- push:- branches:- - main- release:- types: [released]--jobs:- docker-arm64:- runs-on: [self-hosted, linux, ARM64, docker-installed]- if: github.event_name != 'release'- steps:- - name: Set up Docker Buildx- uses: docker/setup-buildx-action@v1-- - name: Login to DockerHub- uses: docker/login-action@v1- with:- username: ${{ secrets.DOCKERHUB_USERNAME }}- password: ${{ secrets.DOCKERHUB_TOKEN }}-- - name: Build and push- uses: docker/build-push-action@v2- with:- push: true- file: docker/Dockerfile- tags: |- manimcommunity/manim:latest-- docker-amd64:- runs-on: ubuntu-latest- if: github.event_name != 'release'- steps:- - name: Set up Docker Buildx- uses: docker/setup-buildx-action@v1-- - name: Login to DockerHub- uses: docker/login-action@v1- with:- username: ${{ secrets.DOCKERHUB_USERNAME }}- password: ${{ secrets.DOCKERHUB_TOKEN }}-- - name: Build and push- uses: docker/build-push-action@v2- with:- push: true- file: docker/Dockerfile- tags: |- manimcommunity/manim:latest-- docker-arm64-release:- runs-on: [self-hosted, linux, ARM64, docker-installed]- if: github.event_name == 'release'- steps:- - name: Set up Docker Buildx- uses: docker/setup-buildx-action@v1-- - name: Login to DockerHub- uses: docker/login-action@v1- with:- username: ${{ secrets.DOCKERHUB_USERNAME }}- password: ${{ secrets.DOCKERHUB_TOKEN }}-- - name: Get Version- id: create_release- shell: python- env:- tag_act: ${{ github.ref }}- run: |- import os- ref_tag = os.getenv('tag_act').split('/')[-1]- print(f"::set-output name=tag_name::{ref_tag}")-- - name: Build and push- uses: docker/build-push-action@v2- with:- push: true- file: docker/Dockerfile- tags: |- manimcommunity/manim:stable- manimcommunity/manim:latest- manimcommunity/manim:${{ steps.create_release.outputs.tag_name }}-- docker-amd64-release:- runs-on: ubuntu-latest- if: github.event_name == 'release'- steps:- - name: Set up Docker Buildx- uses: docker/setup-buildx-action@v1-- - name: Login to DockerHub- uses: docker/login-action@v1- with:- username: ${{ secrets.DOCKERHUB_USERNAME }}- password: ${{ secrets.DOCKERHUB_TOKEN }}-- - name: Get Version- id: create_release- shell: python- env:- tag_act: ${{ github.ref }}- run: |- import os- ref_tag = os.getenv('tag_act').split('/')[-1]- print(f"::set-output name=tag_name::{ref_tag}")-- - name: Build and push- uses: docker/build-push-action@v2- with:- push: true- file: docker/Dockerfile- tags: |- manimcommunity/manim:stable- manimcommunity/manim:latest- manimcommunity/manim:${{ steps.create_release.outputs.tag_name }}