-
Notifications
You must be signed in to change notification settings - Fork 25
187 lines (185 loc) · 10.3 KB
/
action.yml
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
name: ci
on:
push:
branches:
- '**'
tags:
- '!7**'
release:
types:
- 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@v5
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@v5
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
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 Ubuntu Image
id: docker_build_ubuntu
uses: docker/build-push-action@v4
with:
context: .
file: ./Dockerfile.ubuntu
push: false
load: true
tags: im-ubuntu
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache
- name: Testing Ubuntu Image
run: |
docker run --rm im-ubuntu -list configure
docker run --rm -v $(pwd)/test-images:/imgs im-ubuntu -resize 500 /imgs/test.jpg /imgs/test-resize.jpg
docker run --rm -v $(pwd)/test-images:/imgs im-ubuntu -resize 500 /imgs/test.jpg webp:/imgs/test-jpg.webp
docker run --rm -v $(pwd)/test-images:/imgs im-ubuntu -resize 500 /imgs/test.jpg avif:/imgs/test-jpg.avif
docker run --rm -v $(pwd)/test-images:/imgs im-ubuntu -resize 100 /imgs/test.png /imgs/test-resize.png
docker run --rm -v $(pwd)/test-images:/imgs im-ubuntu -resize 100 /imgs/test.png webp:/imgs/test-png.webp
docker run --rm -v $(pwd)/test-images:/imgs im-ubuntu -resize 100 /imgs/test.png avif:/imgs/test-png.avif
docker run --rm -v $(pwd)/test-images:/imgs im-ubuntu -resize 100 /imgs/test.png jxl:/imgs/test-png.jxl
docker run --rm -v $(pwd)/test-images:/imgs im-ubuntu /imgs/test.pdf /imgs/test-pdf.png
docker run --rm -v $(pwd)/test-images:/imgs im-ubuntu /imgs/jpg-with-metadata.jpg /imgs/jpg-with-metadata.webp
docker run --rm -v $(pwd)/test-images:/imgs im-ubuntu -coalesce /imgs/test.gif /imgs/test-gif.webp
docker run --rm -v $(pwd)/test-images:/imgs im-ubuntu -resize 200 /imgs/test.tiff /imgs/test-resize.tiff
docker run --rm -v $(pwd)/test-images:/imgs im-ubuntu -resize 200 /imgs/test.tiff webp:/imgs/test-tiff.webp
docker run --rm -v $(pwd)/test-images:/imgs im-ubuntu -resize 200 /imgs/test.tiff avif:/imgs/test-tiff.avif
docker run --rm -v $(pwd)/test-images:/imgs im-ubuntu -resize 200 /imgs/test.tiff jxl:/imgs/test-tiff.jxl
docker run --rm -v $(pwd)/test-images:/imgs im-ubuntu /imgs/test.jpg -antialias -font DejaVu-Sans -pointsize 20 -gravity Southeast -annotate +15+15 'TEST' /imgs/test-text.jpg
docker run --rm im-ubuntu -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: ubuntu-tests
path: test-images
- name: Push Ubuntu image
id: docker_push_ubuntu
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
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache