chore(actions): use matrix build for mzz2017/v2raya

This commit is contained in:
mzz2017 committed 2021-08-11 16:59:46 +08:00
1 parent 68c56e6307
commit 8555a0efe5
2 files changed
+9 -4

No files matched your search

+9 -3
View File
@@ -11,12 +11,18 @@ env:
jobs:
build:
strategy:
fail-fast: false
matrix:
platform: [linux/arm, linux/arm64,linux/amd64]
runs-on: ubuntu-latest
env:
PLATFORM: ${{ matrix.platform }}
steps:
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::$(echo $GITHUB_REF | cut -d / -f 3)
- uses: actions/checkout@v2 # https://github.com/docker/setup-qemu-action
- uses: actions/checkout@v2
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
@@ -25,5 +31,5 @@ jobs:
run: |
docker login -u ${{secrets.DOCKER_USERNAME}} -p ${{secrets.DOCKER_PASSWORD}}
v=$(echo ${{ steps.get_version.outputs.VERSION }} | cut -c2-)
docker buildx build -t mzz2017/v2raya:$v -f Dockerfile --platform=linux/arm,linux/arm64,linux/amd64 . --push
docker buildx build -t mzz2017/v2raya:latest -f Dockerfile --platform=linux/arm,linux/arm64,linux/amd64 . --push
docker buildx build -t mzz2017/v2raya:$v -f Dockerfile --platform="$PLATFORM" . --push
docker buildx build -t mzz2017/v2raya:latest -f Dockerfile --platform="$PLATFORM" . --push
-1
View File
@@ -12,7 +12,6 @@ WORKDIR /build/service
ENV GO111MODULE=on
ENV GOPROXY=https://goproxy.io
COPY --from=builder-web /build/web server/router/web
RUN ls -lha server/router/ server/router/web
RUN go mod tidy && CGO_ENABLED=0 go build -ldflags="-X github.com/v2rayA/v2rayA/global.Version=unstable -s -w" -o v2raya .
FROM v2fly/v2fly-core