mirror of
https://github.com/gravitl/netmaker.git
synced 2025-09-04 04:04:17 +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
|
||||
uses: docker/setup-buildx-action@v2
|
||||
-
|
||||
name: Login to DockerHub
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
#-
|
||||
# name: Login to DockerHub
|
||||
# uses: docker/login-action@v2
|
||||
# with:
|
||||
# username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
# password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
-
|
||||
name: Build and push
|
||||
uses: docker/build-push-action@v3
|
||||
|
@ -47,7 +47,7 @@ jobs:
|
|||
platforms: linux/amd64, linux/arm64, linux/arm/v7
|
||||
push: true
|
||||
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:
|
||||
runs-on: ubuntu-latest
|
||||
|
@ -56,7 +56,7 @@ jobs:
|
|||
name: Set tag
|
||||
run: |
|
||||
if [[ -n "${{ github.event.inputs.tag }}" ]]; then
|
||||
docker/build-push-action@v3.tag }}
|
||||
TAG=${{ github.event.inputs.tag }}
|
||||
elif [[ "${{ github.ref_name }}" == 'master' ]]; then
|
||||
TAG="latest"
|
||||
else
|
||||
|
@ -86,4 +86,4 @@ jobs:
|
|||
platforms: linux/amd64, linux/arm64, linux/arm/v7
|
||||
push: true
|
||||
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
|
||||
|
||||
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
|
||||
FROM alpine:3.16.2
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue