9797 echo "current-context:" ${CURRENTCONTEXT}
9898 export KUBECONFIG="${HOME}/.kube/config"
9999 echo "environment-kubeconfig:" ${KUBECONFIG}
100- GOPROXY=direct GOSUMDB=off GO111MODULE=on go test ./...
101- build :
102- name : Build check
103- runs-on : ubuntu-latest
104- # needs: [lint, error_check, static_check, vet, sec_check, tests]
105- steps :
106- - name : Check out code
107- uses : actions/checkout@master
108- with :
109- fetch-depth : 1
110- - name : Setup Go
111- uses : actions/setup-go@v1
112- with :
113- go-version : ${{ secrets.GO_VERSION }}
114- - run : GOPROXY=direct GOSUMDB=off GO111MODULE=on go build .
115- docker :
116- name : Docker build and push
117- runs-on : ubuntu-latest
118- # needs: [build, build_release]
119- steps :
120- - name : Check out code
121- if : github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/') && success()
122- uses : actions/checkout@master
123- with :
124- fetch-depth : 1
125- - name : Docker login
126- if : github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/') && success()
127- uses : azure/container-actions/docker-login@master
128- with :
129- username : ${{ secrets.DOCKER_USERNAME }}
130- password : ${{ secrets.DOCKER_PASSWORD }}
131- - name : Docker build & tag
132- if : github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/') && success()
133- run : |
134- DOCKER_BUILDKIT=1 docker build --no-cache -t ${{ secrets.IMAGE_NAME }}:stable-latest .
135- docker tag ${{ secrets.IMAGE_NAME }}:stable-latest ${{ secrets.IMAGE_NAME }}:edge-${GITHUB_REF/refs\/tags\//}
136- docker tag ${{ secrets.IMAGE_NAME }}:stable-latest ${{ secrets.IMAGE_NAME }}:edge-latest
137- docker tag ${{ secrets.IMAGE_NAME }}:stable-latest ${{ secrets.IMAGE_NAME }}:stable-${GITHUB_REF/refs\/tags\//}
138- docker tag ${{ secrets.IMAGE_NAME }}:stable-latest ${{ secrets.IMAGE_NAME }}:stable-${GITHUB_SHA::7}
139- - name : Docker push
140- if : github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/') && success()
141- run : |
142- docker push ${{ secrets.IMAGE_NAME }}:stable-latest
143- docker push ${{ secrets.IMAGE_NAME }}:edge-${GITHUB_REF/refs\/tags\//}
144- docker push ${{ secrets.IMAGE_NAME }}:edge-latest
145- docker push ${{ secrets.IMAGE_NAME }}:stable-${GITHUB_REF/refs\/tags\//}
146- docker push ${{ secrets.IMAGE_NAME }}:stable-${GITHUB_SHA::7}
147- - name : Docker Hub Description
148- if : github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/') && success()
149- uses :
peter-evans/[email protected] 150- env :
151- DOCKERHUB_USERNAME : ${{ secrets.DOCKER_USERNAME }}
152- DOCKERHUB_PASSWORD : ${{ secrets.DOCKER_PASSWORD }}
153- DOCKERHUB_REPOSITORY : ${{ secrets.IMAGE_NAME }}
100+ GOPROXY=direct GOSUMDB=off GO111MODULE=on go test ./...
0 commit comments