File tree Expand file tree Collapse file tree 3 files changed +36
-29
lines changed
Expand file tree Collapse file tree 3 files changed +36
-29
lines changed Original file line number Diff line number Diff line change 1+ name : CI
2+ on :
3+ push :
4+ branches :
5+ - master
6+ tags :
7+ - ' **'
8+ pull_request :
9+
10+ jobs :
11+ test :
12+ runs-on : ubuntu-latest
13+ steps :
14+ - name : Checkout Code
15+ uses : actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
16+ - name : Setup Golang
17+ uses : actions/setup-go@c4a742cab115ed795e34d4513e2cf7d472deb55f # v3.3.1
18+ with :
19+ go-version-file : go.mod
20+ - name : Test
21+ run : make test
22+ publish :
23+ if : startsWith(github.ref, 'refs/tags')
24+ runs-on : ubuntu-latest
25+ steps :
26+ - name : Checkout Code
27+ uses : actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
28+ - name : Publish
29+ run : make publish
30+ env :
31+ DOCKER_USERNAME : ${{ secrets.DOCKER_HUB_USERNAME }}
32+ DOCKER_PASSWORD : ${{ secrets.DOCKER_HUB_PASSWORD }}
33+ DOCKER_TAG : ${{ github.ref_name }}
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -47,10 +47,10 @@ install-pact:
4747.PHONY : publish
4848publish :
4949 @echo " ==> Building docker image..."
50- docker build --build-arg APPNAME=pact-proxy -f build/package/pact-proxy/Dockerfile -t $(DOCKER_IMG ) :$(TRAVIS_TAG ) .
50+ docker build --build-arg APPNAME=pact-proxy -f build/package/pact-proxy/Dockerfile -t $(DOCKER_IMG ) :$(DOCKER_TAG ) .
5151 @echo " ==> Logging in to the docker registry..."
5252 echo " $( DOCKER_PASSWORD) " | docker login -u " $( DOCKER_USERNAME) " --password-stdin
5353 @echo " ==> Pushing built image..."
54- docker push $(DOCKER_IMG ) :$(TRAVIS_TAG )
55- docker tag $(DOCKER_IMG ) :$(TRAVIS_TAG ) $(DOCKER_IMG ) :latest
54+ docker push $(DOCKER_IMG ) :$(DOCKER_TAG )
55+ docker tag $(DOCKER_IMG ) :$(DOCKER_TAG ) $(DOCKER_IMG ) :latest
5656 docker push $(DOCKER_IMG ) :latest
You can’t perform that action at this time.
0 commit comments