mirror of
https://github.com/xjasonlyu/tun2socks.git
synced 2024-12-30 02:37:01 +00:00
fix: empty version
This commit is contained in:
@@ -19,12 +19,18 @@ jobs:
|
||||
|
||||
- name: Check out code into the Go module directory
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v1
|
||||
with:
|
||||
platforms: all
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
with:
|
||||
version: latest
|
||||
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v1
|
||||
@@ -33,16 +39,16 @@ jobs:
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
- name: Get Version
|
||||
id: version
|
||||
uses: oprypin/find-latest-tag@v1
|
||||
with:
|
||||
repository: xjasonlyu/tun2socks
|
||||
id: shell
|
||||
run: |
|
||||
echo ::set-output name=version::$(git describe --tags --abbrev=0)
|
||||
|
||||
- name: Build and Push
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
platforms: linux/amd64,linux/arm64
|
||||
tags: |
|
||||
xjasonlyu/tun2socks:latest
|
||||
xjasonlyu/tun2socks:${{ steps.version.outputs.tag }}
|
||||
xjasonlyu/tun2socks:${{ steps.shell.outputs.version }}
|
||||
|
||||
@@ -25,6 +25,8 @@ jobs:
|
||||
|
||||
- name: Check out code into the Go module directory
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Cache go module
|
||||
uses: actions/cache@v2
|
||||
|
||||
+4
-4
@@ -1,17 +1,17 @@
|
||||
FROM golang:alpine AS builder
|
||||
|
||||
WORKDIR /app
|
||||
COPY . /app
|
||||
WORKDIR /tun2socks-src
|
||||
COPY . /tun2socks-src
|
||||
|
||||
RUN apk add --no-cache make git \
|
||||
&& go mod download \
|
||||
&& make docker \
|
||||
&& /app/bin/tun2socks-docker -v
|
||||
&& mv ./bin/tun2socks-docker /tun2socks
|
||||
|
||||
FROM alpine:latest
|
||||
|
||||
COPY ./scripts/entrypoint.sh /entrypoint.sh
|
||||
COPY --from=builder /app/bin/tun2socks-docker /usr/bin/tun2socks
|
||||
COPY --from=builder /tun2socks /usr/bin/tun2socks
|
||||
|
||||
RUN apk add --update --no-cache iptables iproute2 \
|
||||
&& chmod +x /entrypoint.sh
|
||||
|
||||
Reference in New Issue
Block a user