Skip to content

Commit 6203acb

Browse files
maxb-ioadamiBs
andauthored
Add alpine support (#421)
Co-authored-by: adamiBs <[email protected]>
1 parent 3e867f9 commit 6203acb

File tree

5 files changed

+76
-33
lines changed

5 files changed

+76
-33
lines changed

.github/actions/build-and-tag-locally/action.yml

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@ runs:
4545
linux/arm/v5)
4646
plaform_name="arm-v5"
4747
;;
48+
linux/arm/v6)
49+
plaform_name="arm-v6"
50+
;;
4851
linux/arm/v7)
4952
plaform_name="arm-v7"
5053
;;
@@ -57,6 +60,9 @@ runs:
5760
linux/ppc64le)
5861
plaform_name="ppc64le"
5962
;;
63+
linux/riscv64)
64+
plaform_name="riscv64"
65+
;;
6066
linux/s390x)
6167
plaform_name="s390x"
6268
;;
@@ -100,31 +106,31 @@ runs:
100106
- name: Upload image
101107
uses: actions/upload-artifact@v4
102108
with:
103-
name: ${{ steps.platform.outputs.display_name }}-docker-image.tar
109+
name: ${{ steps.platform.outputs.display_name }}-${{ inputs.distribution }}-docker-image.tar
104110
path: /tmp/image-${{ steps.platform.outputs.display_name }}.tar
105111
retention-days: 45
106112

107113
- name: Run container
108114
shell: bash
109-
if: ${{ contains(fromJSON('["amd64", "arm64", "i386"]'), steps.platform.outputs.display_name) }}
115+
if: ${{ contains(fromJSON('["amd64", "i386"]'), steps.platform.outputs.display_name) }}
110116
run: |
111117
docker run -d --name sanity-test-${{ steps.platform.outputs.display_name }} ${{ github.sha }}:${{ steps.platform.outputs.display_name }}
112118
113119
- name: Container Logs
114-
if: ${{ contains(fromJSON('["amd64", "arm64", "i386"]'), steps.platform.outputs.display_name) }}
120+
if: ${{ contains(fromJSON('["amd64", "i386"]'), steps.platform.outputs.display_name) }}
115121
shell: bash
116122
run: |
117123
docker logs sanity-test-${{ steps.platform.outputs.display_name }}
118124
119125
- name: Sanity Tests
120-
if: ${{ contains(fromJSON('["amd64", "arm64", "i386"]'), steps.platform.outputs.display_name) }}
126+
if: ${{ contains(fromJSON('["amd64", "i386"]'), steps.platform.outputs.display_name) }}
121127
shell: bash
122128
run: |
123129
docker exec sanity-test-${{ steps.platform.outputs.display_name }} redis-cli ping
124130
docker exec sanity-test-${{ steps.platform.outputs.display_name }} redis-cli info server
125131
126132
- name: Verify installed modules
127-
if: ${{ contains(fromJSON('["amd64", "arm64",]'), steps.platform.outputs.display_name) }}
133+
if: ${{ contains(fromJSON('["amd64"]'), steps.platform.outputs.display_name) }}
128134
shell: bash
129135
run: |
130136
modules=$(docker exec sanity-test-${{ steps.platform.outputs.display_name }} redis-cli module list)
@@ -144,7 +150,7 @@ runs:
144150
fi
145151
146152
- name: Test RedisBloom
147-
if: ${{ contains(fromJSON('["amd64", "arm64"]'), steps.platform.outputs.display_name) }}
153+
if: ${{ contains(fromJSON('["amd64"]'), steps.platform.outputs.display_name) }}
148154
shell: bash
149155
run: |
150156
docker exec sanity-test-${{ steps.platform.outputs.display_name }} redis-cli BF.ADD popular_keys "redis:hash"
@@ -154,7 +160,7 @@ runs:
154160
echo "RedisBloom test passed successfully"
155161
156162
- name: Test RediSearch
157-
if: ${{ contains(fromJSON('["amd64", "arm64"]'), steps.platform.outputs.display_name) }}
163+
if: ${{ contains(fromJSON('["amd64"]'), steps.platform.outputs.display_name) }}
158164
shell: bash
159165
run: |
160166
docker exec sanity-test-${{ steps.platform.outputs.display_name }} redis-cli FT.CREATE redis_commands ON HASH PREFIX 1 cmd: SCHEMA name TEXT SORTABLE description TEXT
@@ -169,7 +175,7 @@ runs:
169175
fi
170176
171177
- name: Test RedisTimeSeries
172-
if: ${{ contains(fromJSON('["amd64", "arm64"]'), steps.platform.outputs.display_name) }}
178+
if: ${{ contains(fromJSON('["amd64"]'), steps.platform.outputs.display_name) }}
173179
shell: bash
174180
run: |
175181
docker exec sanity-test-${{ steps.platform.outputs.display_name }} redis-cli TS.CREATE redis:cpu:usage RETENTION 86400
@@ -185,7 +191,7 @@ runs:
185191
fi
186192
187193
- name: Test ReJSON
188-
if: ${{ contains(fromJSON('["amd64", "arm64"]'), steps.platform.outputs.display_name) }}
194+
if: ${{ contains(fromJSON('["amd64"]'), steps.platform.outputs.display_name) }}
189195
shell: bash
190196
run: |
191197
docker exec sanity-test-${{ steps.platform.outputs.display_name }} redis-cli JSON.SET redis:config $ '{"maxmemory":"2gb","maxmemory-policy":"allkeys-lru"}'
@@ -200,7 +206,7 @@ runs:
200206
201207
- name: Push image
202208
uses: docker/build-push-action@v6
203-
if: ${{ inputs.publish_image == 'true' && contains(fromJSON('["amd64","arm64"]'), steps.platform.outputs.display_name) }}
209+
if: ${{ inputs.publish_image == 'true' && contains(fromJSON('["amd64"]'), steps.platform.outputs.display_name) }}
204210
with:
205211
context: ${{ inputs.distribution }}
206212
push: true

.github/workflows/pre-merge.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,27 @@ jobs:
1212
matrix:
1313
distribution:
1414
- debian
15-
#- alpine
15+
- alpine
1616
platform:
1717
- linux/amd64
1818
- linux/i386
1919
- linux/arm/v5
20+
- linux/arm/v6
2021
- linux/arm/v7
2122
- linux/mips64le
2223
- linux/ppc64le
2324
- linux/s390x
25+
- linux/arm64
26+
- linux/riscv64
27+
exclude:
28+
- distribution: alpine
29+
platform: linux/mips64le
30+
- distribution: alpine
31+
platform: linux/arm/v5
32+
- distribution: debian
33+
platform: linux/riscv64
34+
- distribution: debian
35+
platform: linux/arm/v6
2436
steps:
2537
- name: Checkout code
2638
uses: actions/checkout@v4

.gitignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

alpine/Dockerfile

Lines changed: 44 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

debian/Dockerfile

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)