Update workflows, add armv6 as deprectaed image from scratch
This commit is contained in:
parent
96594678f9
commit
bd58d89737
17
.github/workflows/master.yml
vendored
17
.github/workflows/master.yml
vendored
@ -31,17 +31,28 @@ jobs:
|
|||||||
-
|
-
|
||||||
name: Print builder available platforms
|
name: Print builder available platforms
|
||||||
run: echo ${{ steps.buildx.outputs.platforms }}
|
run: echo ${{ steps.buildx.outputs.platforms }}
|
||||||
- name: Dockerhub login
|
-
|
||||||
|
name: Dockerhub login
|
||||||
uses: docker/login-action@v2
|
uses: docker/login-action@v2
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
-
|
-
|
||||||
name: Run Buildx
|
name: Run Buildx for amd64, armv7, arm64 architectures
|
||||||
run: |
|
run: |
|
||||||
docker buildx build \
|
docker buildx build \
|
||||||
--platform linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 \
|
--platform linux/amd64,linux/arm/v7,linux/arm64 \
|
||||||
--output "type=image,push=false" \
|
--output "type=image,push=false" \
|
||||||
--push \
|
--push \
|
||||||
--tag "$DOCKERHUB_REPOSITORY:latest" \
|
--tag "$DOCKERHUB_REPOSITORY:latest" \
|
||||||
.
|
.
|
||||||
|
# Legacy build for armv6
|
||||||
|
-
|
||||||
|
name: Run Buildx for armv6 architecture
|
||||||
|
run: |
|
||||||
|
docker buildx build \
|
||||||
|
--platform linux/arm/v6 \
|
||||||
|
--output "type=image,push=false" \
|
||||||
|
--push \
|
||||||
|
--tag "$DOCKERHUB_REPOSITORY:latest" \
|
||||||
|
Dockerfile.armv6
|
||||||
|
21
.github/workflows/release.yml
vendored
21
.github/workflows/release.yml
vendored
@ -18,14 +18,17 @@ jobs:
|
|||||||
name: Set up Docker Buildx
|
name: Set up Docker Buildx
|
||||||
id: buildx
|
id: buildx
|
||||||
uses: crazy-max/ghaction-docker-buildx@v1.1.0
|
uses: crazy-max/ghaction-docker-buildx@v1.1.0
|
||||||
- name: Release version
|
-
|
||||||
|
name: Release version
|
||||||
run: echo "RELEASE_VERSION=${GITHUB_REF:10}" >> $GITHUB_ENV
|
run: echo "RELEASE_VERSION=${GITHUB_REF:10}" >> $GITHUB_ENV
|
||||||
- name: Print release version
|
-
|
||||||
|
name: Print release version
|
||||||
run: echo ${{ env.RELEASE_VERSION }}
|
run: echo ${{ env.RELEASE_VERSION }}
|
||||||
- name: Dockerhub login
|
-
|
||||||
|
name: Dockerhub login
|
||||||
run: docker login -u ${{ secrets.DOCKERHUB_USERNAME }} -p ${{ secrets.DOCKERHUB_PASSWORD }}
|
run: docker login -u ${{ secrets.DOCKERHUB_USERNAME }} -p ${{ secrets.DOCKERHUB_PASSWORD }}
|
||||||
-
|
-
|
||||||
name: Run Buildx
|
name: Run Buildx for amd64, armv7, arm64 architectures
|
||||||
run: |
|
run: |
|
||||||
docker buildx build \
|
docker buildx build \
|
||||||
--platform linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 \
|
--platform linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 \
|
||||||
@ -33,3 +36,13 @@ jobs:
|
|||||||
--push \
|
--push \
|
||||||
--tag "$DOCKERHUB_REPOSITORY:$RELEASE_VERSION" \
|
--tag "$DOCKERHUB_REPOSITORY:$RELEASE_VERSION" \
|
||||||
.
|
.
|
||||||
|
# Legacy build for armv6
|
||||||
|
-
|
||||||
|
name: Run Buildx for armv6 architecture
|
||||||
|
run: |
|
||||||
|
docker buildx build \
|
||||||
|
--platform linux/arm/v6 \
|
||||||
|
--output "type=image,push=false" \
|
||||||
|
--push \
|
||||||
|
--tag "$DOCKERHUB_REPOSITORY:$RELEASE_VERSION" \
|
||||||
|
Dockerfile.armv6
|
||||||
|
13
Dockerfile.armv6
Normal file
13
Dockerfile.armv6
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
ARG GOLANG_VERSION="1.19.1"
|
||||||
|
|
||||||
|
FROM golang:$GOLANG_VERSION-alpine as builder
|
||||||
|
RUN apk --no-cache add tzdata
|
||||||
|
WORKDIR /go/src/github.com/serjs/socks5
|
||||||
|
COPY . .
|
||||||
|
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -ldflags '-s' -o ./socks5
|
||||||
|
|
||||||
|
FROM SCRATCH
|
||||||
|
COPY --from=builder /go/src/github.com/serjs/socks5/socks5 /
|
||||||
|
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
|
||||||
|
COPY --from=builder /go/src/github.com/serjs/socks5/socks5 /
|
||||||
|
ENTRYPOINT ["/socks5"]
|
Loading…
Reference in New Issue
Block a user