Skip to content

Commit 3fa1cff

Browse files
olof-nordjmattheis
authored andcommitted
Add linux/riscv64 project support
1 parent a8049f5 commit 3fa1cff

3 files changed

Lines changed: 26 additions & 2 deletions

File tree

.github/workflows/build.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,11 @@ jobs:
5252
docker push --all-tags gotify/server
5353
docker push --all-tags gotify/server-arm7
5454
docker push --all-tags gotify/server-arm64
55+
docker push --all-tags gotify/server-riscv64
5556
docker push --all-tags ghcr.io/gotify/server
5657
docker push --all-tags ghcr.io/gotify/server-arm7
5758
docker push --all-tags ghcr.io/gotify/server-arm64
59+
docker push --all-tags ghcr.io/gotify/server-riscv64
5860
env:
5961
DOCKER_USER: ${{ secrets.DOCKER_USER }}
6062
DOCKER_PASS: ${{ secrets.DOCKER_PASS }}

Makefile

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,21 @@ build-docker-arm64: require-version
110110
-t ghcr.io/gotify/server-arm64:$(shell echo $(VERSION) | cut -d '.' -f -1) .
111111
rm ${DOCKER_DIR}gotify-app
112112

113-
build-docker: build-docker-amd64 build-docker-arm-7 build-docker-arm64
113+
build-docker-riscv64: require-version
114+
cp ${BUILD_DIR}/gotify-linux-riscv64 ./docker/gotify-app
115+
cd ${DOCKER_DIR} && \
116+
docker build -f Dockerfile.riscv64 \
117+
-t gotify/server-riscv64:latest \
118+
-t gotify/server-riscv64:${VERSION} \
119+
-t gotify/server-riscv64:$(shell echo $(VERSION) | cut -d '.' -f -2) \
120+
-t gotify/server-riscv64:$(shell echo $(VERSION) | cut -d '.' -f -1) \
121+
-t ghcr.io/gotify/server-riscv64:latest \
122+
-t ghcr.io/gotify/server-riscv64:${VERSION} \
123+
-t ghcr.io/gotify/server-riscv64:$(shell echo $(VERSION) | cut -d '.' -f -2) \
124+
-t ghcr.io/gotify/server-riscv64:$(shell echo $(VERSION) | cut -d '.' -f -1) .
125+
rm ${DOCKER_DIR}gotify-app
126+
127+
build-docker: build-docker-amd64 build-docker-arm-7 build-docker-arm64 build-docker-riscv64
114128

115129
build-js:
116130
(cd ui && yarn build)
@@ -127,12 +141,15 @@ build-linux-arm-7:
127141
build-linux-arm64:
128142
${DOCKER_RUN} ${DOCKER_BUILD_IMAGE}:$(GO_VERSION)-linux-arm64 ${DOCKER_GO_BUILD} -o ${BUILD_DIR}/gotify-linux-arm64 ${DOCKER_WORKDIR}
129143

144+
build-linux-riscv64:
145+
${DOCKER_RUN} ${DOCKER_BUILD_IMAGE}:$(GO_VERSION)-linux-riscv64 ${DOCKER_GO_BUILD} -o ${BUILD_DIR}/gotify-linux-riscv64 ${DOCKER_WORKDIR}
146+
130147
build-windows-amd64:
131148
${DOCKER_RUN} ${DOCKER_BUILD_IMAGE}:$(GO_VERSION)-windows-amd64 ${DOCKER_GO_BUILD} -o ${BUILD_DIR}/gotify-windows-amd64.exe ${DOCKER_WORKDIR}
132149

133150
build-windows-386:
134151
${DOCKER_RUN} ${DOCKER_BUILD_IMAGE}:$(GO_VERSION)-windows-386 ${DOCKER_GO_BUILD} -o ${BUILD_DIR}/gotify-windows-386.exe ${DOCKER_WORKDIR}
135152

136-
build: build-linux-arm-7 build-linux-amd64 build-linux-386 build-linux-arm64 build-windows-amd64 build-windows-386
153+
build: build-linux-arm-7 build-linux-amd64 build-linux-386 build-linux-arm64 build-linux-riscv64 build-windows-amd64 build-windows-386
137154

138155
.PHONY: test-race test-coverage test check-go check-js verify-swagger check download-tools update-swagger package-zip build-docker build-js build

docker/Dockerfile.riscv64

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
FROM riscv64/debian:sid-slim
2+
WORKDIR /app
3+
ADD gotify-app /app/
4+
EXPOSE 80
5+
ENTRYPOINT ["./gotify-app"]

0 commit comments

Comments
 (0)