mirror of
https://github.com/gravitl/netmaker.git
synced 2025-09-05 20:54:18 +08:00
refactor workflow
This commit is contained in:
parent
15ff1c8868
commit
e7427c89cc
2 changed files with 10 additions and 10 deletions
18
.github/workflows/publish-docker.yml
vendored
18
.github/workflows/publish-docker.yml
vendored
|
@ -33,12 +33,12 @@ jobs:
|
||||||
-
|
-
|
||||||
name: Set up Docker Buildx
|
name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v2
|
uses: docker/setup-buildx-action@v2
|
||||||
-
|
#-
|
||||||
name: Login to DockerHub
|
# name: Login to DockerHub
|
||||||
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: Build and push
|
name: Build and push
|
||||||
uses: docker/build-push-action@v3
|
uses: docker/build-push-action@v3
|
||||||
|
@ -47,7 +47,7 @@ jobs:
|
||||||
platforms: linux/amd64, linux/arm64, linux/arm/v7
|
platforms: linux/amd64, linux/arm64, linux/arm/v7
|
||||||
push: true
|
push: true
|
||||||
tags: ${{ github.repository }}:${{ env.TAG }}, ${{ github.repository }}:latest
|
tags: ${{ github.repository }}:${{ env.TAG }}, ${{ github.repository }}:latest
|
||||||
build-args: version=${{ env.TAG }}, tags="-tags=ce"
|
build-args: version=${{ env.TAG }}, tags=ce
|
||||||
|
|
||||||
docker-ee:
|
docker-ee:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
@ -56,7 +56,7 @@ jobs:
|
||||||
name: Set tag
|
name: Set tag
|
||||||
run: |
|
run: |
|
||||||
if [[ -n "${{ github.event.inputs.tag }}" ]]; then
|
if [[ -n "${{ github.event.inputs.tag }}" ]]; then
|
||||||
docker/build-push-action@v3.tag }}
|
TAG=${{ github.event.inputs.tag }}
|
||||||
elif [[ "${{ github.ref_name }}" == 'master' ]]; then
|
elif [[ "${{ github.ref_name }}" == 'master' ]]; then
|
||||||
TAG="latest"
|
TAG="latest"
|
||||||
else
|
else
|
||||||
|
@ -86,4 +86,4 @@ jobs:
|
||||||
platforms: linux/amd64, linux/arm64, linux/arm/v7
|
platforms: linux/amd64, linux/arm64, linux/arm/v7
|
||||||
push: true
|
push: true
|
||||||
tags: ${{ github.repository }}:${{ env.TAG }}-ee
|
tags: ${{ github.repository }}:${{ env.TAG }}-ee
|
||||||
build-args: version=${{ env.TAG }}, tags="-tags=ee"
|
build-args: version=${{ env.TAG }}, tags=ee
|
||||||
|
|
|
@ -7,7 +7,7 @@ COPY . .
|
||||||
ENV GO111MODULE=auto
|
ENV GO111MODULE=auto
|
||||||
|
|
||||||
RUN apk add git
|
RUN apk add git
|
||||||
RUN GOOS=linux CGO_ENABLED=1 go build -ldflags="-s -X 'main.version=${version}'" ${tags} .
|
RUN GOOS=linux CGO_ENABLED=1 go build -ldflags="-s -X 'main.version=${version}'" -tags ${tags} .
|
||||||
# RUN go build -tags=ee . -o netmaker main.go
|
# RUN go build -tags=ee . -o netmaker main.go
|
||||||
FROM alpine:3.16.2
|
FROM alpine:3.16.2
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue