Skip to content

Commit

Permalink
Using macos runner
Browse files Browse the repository at this point in the history
  • Loading branch information
dooman87 committed Jul 23, 2024
1 parent 2f7aab1 commit cdeb14e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 120 deletions.
4 changes: 3 additions & 1 deletion .github/actions/setup-docker/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ runs:
# - name: Set up QEMU
# uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v3
with:
platforms: linux/amd64,linux/arm64
- name: Login to DockerHub
uses: docker/login-action@v3
with:
Expand Down
122 changes: 3 additions & 119 deletions .github/workflows/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,124 +11,8 @@ on:
- published

jobs:
build-debian-bullseye:
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Docker
uses: ./.github/actions/setup-docker
with:
docker-user: ${{ secrets.DOCKERHUB_USERNAME }}
docker-password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build Debian Bullseye Image
id: docker_build_bullseye
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile.bullseye
push: false
load: true
tags: im-bullseye
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache
- name: Testing Debian Bullseye Image
run: |
docker run --rm im-bullseye -list configure
docker run --rm -v $(pwd)/test-images:/imgs im-bullseye -resize 500 /imgs/test.jpg /imgs/test-resize.jpg
docker run --rm -v $(pwd)/test-images:/imgs im-bullseye -resize 500 /imgs/test.jpg webp:/imgs/test-jpg.webp
docker run --rm -v $(pwd)/test-images:/imgs im-bullseye -resize 500 /imgs/test.jpg avif:/imgs/test-jpg.avif
docker run --rm -v $(pwd)/test-images:/imgs im-bullseye -resize 100 /imgs/test.png /imgs/test-resize.png
docker run --rm -v $(pwd)/test-images:/imgs im-bullseye -resize 100 /imgs/test.png webp:/imgs/test-png.webp
docker run --rm -v $(pwd)/test-images:/imgs im-bullseye -resize 100 /imgs/test.png avif:/imgs/test-png.avif
docker run --rm -v $(pwd)/test-images:/imgs im-bullseye -resize 100 /imgs/test.png jxl:/imgs/test-png.jxl
docker run --rm -v $(pwd)/test-images:/imgs im-bullseye /imgs/test.pdf /imgs/test-pdf.png
docker run --rm -v $(pwd)/test-images:/imgs im-bullseye /imgs/jpg-with-metadata.jpg /imgs/jpg-with-metadata.webp
docker run --rm -v $(pwd)/test-images:/imgs im-bullseye -coalesce /imgs/test.gif /imgs/test-gif.webp
docker run --rm -v $(pwd)/test-images:/imgs im-bullseye -resize 200 /imgs/test.tiff /imgs/test-resize.tiff
docker run --rm -v $(pwd)/test-images:/imgs im-bullseye -resize 200 /imgs/test.tiff webp:/imgs/test-tiff.webp
docker run --rm -v $(pwd)/test-images:/imgs im-bullseye -resize 200 /imgs/test.tiff avif:/imgs/test-tiff.avif
docker run --rm -v $(pwd)/test-images:/imgs im-bullseye -resize 200 /imgs/test.tiff jxl:/imgs/test-tiff.jxl
docker run --rm -v $(pwd)/test-images:/imgs im-bullseye /imgs/test.jpg -antialias -font DejaVu-Sans -pointsize 20 -gravity Southeast -annotate +15+15 'TEST' /imgs/test-text.jpg
docker run --rm im-bullseye -list configure | grep DELEGATES | grep "fontconfig freetype heic jbig jng jpeg jxl lcms lzma png ps tiff webp x xml zlib"
- name: Upload Test Results
uses: actions/upload-artifact@v3
with:
name: bullseye-tests
path: test-images
- name: Push Debian Bullseye image
id: docker_push_bullseye
if: ${{ github.event_name == 'release' }}
uses: docker/build-push-action@v
with:
context: .
file: ./Dockerfile.bullseye
push: true
load: false
platforms: linux/amd64,linux/arm64
tags: dpokidov/imagemagick:${{ github.event.release.tag_name }},dpokidov/imagemagick:${{ github.event.release.tag_name }}-bullseye,dpokidov/imagemagick:latest-bullseye,dpokidov/imagemagick:latest
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache
build-debian-bookworm:
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Docker
uses: ./.github/actions/setup-docker
with:
docker-user: ${{ secrets.DOCKERHUB_USERNAME }}
docker-password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build Debian Bookworm Image
id: docker_build_bookworm
uses: docker/build-push-action@v4
with:
context: .
file: ./Dockerfile.bookworm
push: false
load: true
tags: im-bookworm
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache
- name: Testing Debian Bookworm Image
run: |
docker run --rm im-bookworm -list configure
docker run --rm -v $(pwd)/test-images:/imgs im-bookworm -resize 500 /imgs/test.jpg /imgs/test-resize.jpg
docker run --rm -v $(pwd)/test-images:/imgs im-bookworm -resize 500 /imgs/test.jpg webp:/imgs/test-jpg.webp
docker run --rm -v $(pwd)/test-images:/imgs im-bookworm -resize 500 /imgs/test.jpg avif:/imgs/test-jpg.avif
docker run --rm -v $(pwd)/test-images:/imgs im-bookworm -resize 100 /imgs/test.png /imgs/test-resize.png
docker run --rm -v $(pwd)/test-images:/imgs im-bookworm -resize 100 /imgs/test.png webp:/imgs/test-png.webp
docker run --rm -v $(pwd)/test-images:/imgs im-bookworm -resize 100 /imgs/test.png avif:/imgs/test-png.avif
docker run --rm -v $(pwd)/test-images:/imgs im-bookworm -resize 100 /imgs/test.png jxl:/imgs/test-png.jxl
docker run --rm -v $(pwd)/test-images:/imgs im-bookworm /imgs/test.pdf /imgs/test-pdf.png
docker run --rm -v $(pwd)/test-images:/imgs im-bookworm /imgs/jpg-with-metadata.jpg /imgs/jpg-with-metadata.webp
docker run --rm -v $(pwd)/test-images:/imgs im-bookworm -coalesce /imgs/test.gif /imgs/test-gif.webp
docker run --rm -v $(pwd)/test-images:/imgs im-bookworm -resize 200 /imgs/test.tiff /imgs/test-resize.tiff
docker run --rm -v $(pwd)/test-images:/imgs im-bookworm -resize 200 /imgs/test.tiff webp:/imgs/test-tiff.webp
docker run --rm -v $(pwd)/test-images:/imgs im-bookworm -resize 200 /imgs/test.tiff avif:/imgs/test-tiff.avif
docker run --rm -v $(pwd)/test-images:/imgs im-bookworm -resize 200 /imgs/test.tiff jxl:/imgs/test-tiff.jxl
docker run --rm -v $(pwd)/test-images:/imgs im-bookworm /imgs/test.jpg -antialias -font DejaVu-Sans -pointsize 20 -gravity Southeast -annotate +15+15 'TEST' /imgs/test-text.jpg
docker run --rm im-bookworm -list configure | grep DELEGATES | grep "fontconfig freetype heic jbig jng jpeg jxl lcms lzma png ps tiff webp x xml zlib"
- name: Upload Test Results
uses: actions/upload-artifact@v3
with:
name: bookworm-tests
path: test-images
- name: Push Debian Bookworm image
id: docker_push_bookworm
if: ${{ github.event_name == 'release' }}
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile.bookworm
push: true
load: false
platforms: linux/amd64,linux/arm64
tags: dpokidov/imagemagick:${{ github.event.release.tag_name }}-bookworm,dpokidov/imagemagick:latest-bookworm
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache
build-ubuntu:
runs-on: ubuntu-24.04
runs-on: macos-14
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down Expand Up @@ -174,14 +58,14 @@ jobs:
path: test-images
- name: Push Ubuntu image
id: docker_push_ubuntu
if: ${{ github.event_name == 'release' }}
# if: ${{ github.event_name == 'release' }}
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile.ubuntu
push: false
load: false
platforms: linux/amd64,linux/arm64
tags: dpokidov/imagemagick:${{ github.event.release.tag_name }}-ubuntu,dpokidov/imagemagick:latest-ubuntu
tags: dpokidov/imagemagick:test-ubuntu
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache

0 comments on commit cdeb14e

Please sign in to comment.