Merge pull request #15 from sinlov-opensource/master

👷 to support platform `linux/arm/v7`
This commit is contained in:
Stille
2023-04-25 22:04:55 +08:00
committed by GitHub
3 changed files with 15 additions and 7 deletions

View File

@@ -40,7 +40,7 @@ jobs:
uses: docker/build-push-action@v2 uses: docker/build-push-action@v2
with: with:
context: . context: .
platforms: linux/amd64,linux/arm64 platforms: linux/amd64,linux/arm64,linux/arm/v7
push: true push: true
tags: | tags: |
${{ secrets.DOCKER_USERNAME }}/${{ env.PROJECT }}:latest ${{ secrets.DOCKER_USERNAME }}/${{ env.PROJECT }}:latest
@@ -65,7 +65,7 @@ jobs:
uses: docker/build-push-action@v2 uses: docker/build-push-action@v2
with: with:
context: . context: .
platforms: linux/amd64,linux/arm64 platforms: linux/amd64,linux/arm64,linux/arm/v7
push: true push: true
tags: | tags: |
${{ secrets.HARBOR_REGISTRY }}/${{ secrets.HARBOR_USERNAME }}/${{ env.PROJECT }}:latest ${{ secrets.HARBOR_REGISTRY }}/${{ secrets.HARBOR_USERNAME }}/${{ env.PROJECT }}:latest

View File

@@ -9,7 +9,11 @@ RUN apk add --no-cache tzdata \
&& ln -snf /usr/share/zoneinfo/${TZ} /etc/localtime \ && ln -snf /usr/share/zoneinfo/${TZ} /etc/localtime \
&& echo ${TZ} > /etc/timezone && echo ${TZ} > /etc/timezone
RUN if [ "$(uname -m)" = "x86_64" ]; then export PLATFORM=amd64 ; else if [ "$(uname -m)" = "aarch64" ]; then export PLATFORM=arm64 ; fi fi \ RUN if [ "$(uname -m)" = "x86_64" ]; then export PLATFORM=amd64 ; \
elif [ "$(uname -m)" = "aarch64" ]; then export PLATFORM=arm64 ; \
elif [ "$(uname -m)" = "armv7" ]; then export PLATFORM=arm ; \
elif [ "$(uname -m)" = "armv7l" ]; then export PLATFORM=arm ; \
elif [ "$(uname -m)" = "armhf" ]; then export PLATFORM=arm ; fi \
&& wget --no-check-certificate https://github.com/fatedier/frp/releases/download/v${VERSION}/frp_${VERSION}_linux_${PLATFORM}.tar.gz \ && wget --no-check-certificate https://github.com/fatedier/frp/releases/download/v${VERSION}/frp_${VERSION}_linux_${PLATFORM}.tar.gz \
&& tar xzf frp_${VERSION}_linux_${PLATFORM}.tar.gz \ && tar xzf frp_${VERSION}_linux_${PLATFORM}.tar.gz \
&& cd frp_${VERSION}_linux_${PLATFORM} \ && cd frp_${VERSION}_linux_${PLATFORM} \

View File

@@ -63,10 +63,14 @@ PROXY_HTTP_CODE=$(curl -o /dev/null --connect-timeout 5 --max-time 8 -s --head -
# check arch # check arch
if [ $(uname -m) = "x86_64" ]; then if [ $(uname -m) = "x86_64" ]; then
PLATFORM=amd64 PLATFORM=amd64
fi elif [ $(uname -m) = "aarch64" ]; then
if [ $(uname -m) = "aarch64" ]; then
PLATFORM=arm64 PLATFORM=arm64
elif [ $(uname -m) = "armv7" ]; then
PLATFORM=arm
elif [ $(uname -m) = "armv7l" ]; then
PLATFORM=arm
elif [ $(uname -m) = "armhf" ]; then
PLATFORM=arm
fi fi
FILE_NAME=frp_${FRP_VERSION}_linux_${PLATFORM} FILE_NAME=frp_${FRP_VERSION}_linux_${PLATFORM}