File tree Expand file tree Collapse file tree 4 files changed +15
-3
lines changed
Expand file tree Collapse file tree 4 files changed +15
-3
lines changed Original file line number Diff line number Diff line change 1- name : test and release
1+ name : release
22
33on : push
44
2323 - name : Build ui
2424 run : make build-ui
2525
26+ - name : Publish to Registry
27+ if : startsWith(github.ref, 'refs/tags/')
28+ run : |
29+ docker build -t igorfonin/hoverfly .
30+ docker tag ${{ secrets.DOCKER_IMAGE_USER }}/hoverfly ghcr.io/${{ secrets.DOCKER_IMAGE_USER }}/hoverfly:${GITHUB_REF:10}
31+ docker tag ${{ secrets.DOCKER_IMAGE_USER }}/hoverfly ghcr.io/${{ secrets.DOCKER_IMAGE_USER }}/hoverfly:latest
32+ docker login -u ${{ secrets.DOCKER_USER }} -p ${{ secrets.GH_TOKEN }} ghcr.io
33+ docker push ghcr.io/${{ secrets.DOCKER_IMAGE_USER }}/hoverfly:${GITHUB_REF:10}
34+ docker push ghcr.io/${{ secrets.DOCKER_IMAGE_USER }}/hoverfly:latest
35+
2636 - name : Build
2737 run : GIT_TAG_NAME=master-$GITHUB_RUN_NUMBER make build
2838
Original file line number Diff line number Diff line change 11FROM golang:1.16.7 AS build-env
22WORKDIR /usr/local/go/src/github.com/SpectoLabs/hoverfly
3- COPY . /usr/local/go/src/github.com/SpectoLabs/hoverfly
3+ COPY . /usr/local/go/src/github.com/SpectoLabs/hoverfly
44RUN cd core/cmd/hoverfly && CGO_ENABLED=0 GOOS=linux go install -ldflags "-s -w"
55
66FROM alpine:latest
Original file line number Diff line number Diff line change 4040
4141build-ui :
4242 wget https://github.com/MegafonWebLab/hoverfly-ui/releases/download/v0.1.2/release.zip
43- unzip release.zip -d hoverfly-ui
43+ mkdir hoverfly-ui
44+ unzip ./release.zip -d hoverfly-ui
4445 cd core && \
4546 statik -src=../hoverfly-ui/build
4647 rm -rf release.zip
Original file line number Diff line number Diff line change @@ -86,6 +86,7 @@ func (this *AdminApi) addDashboardRoutes(router *bone.Mux) *bone.Mux {
8686 router .HandleFunc ("/simulations/new" , indexHandler )
8787 router .HandleFunc ("/simulations" , indexHandler )
8888 router .HandleFunc ("/settings" , indexHandler )
89+ router .HandleFunc ("/login" , indexHandler )
8990 router .Handle ("/" , http .FileServer (statikFS ))
9091 router .Handle ("/*.js" , http .FileServer (statikFS ))
9192 router .Handle ("/*.css" , http .FileServer (statikFS ))
You can’t perform that action at this time.
0 commit comments