1818
1919jobs :
2020
21- build_test_publish :
22- name : Build Test and Publish
21+ test :
22+ name : Test
2323 runs-on : ubuntu-latest
2424 steps :
2525 - name : Set up Go 1.x
@@ -40,40 +40,70 @@ jobs:
4040 - name : Check code modifications
4141 run : git diff --exit-code
4242
43+ build :
44+ name : Build
45+ runs-on : ubuntu-latest
46+ steps :
47+ - name : Set up Go 1.x
48+ uses : actions/setup-go@v2
49+ with :
50+ go-version : ^1.14
51+ id : go
52+
53+ - name : Check out code into the Go module directory
54+ uses : actions/checkout@v2
55+
56+ - name : Install promu
57+ run : make promu
58+
4359 - name : Build Cross-Platform
4460 run : promu crossbuild -v
4561
62+ - name : Upload .build artifacts
63+ uses : actions/upload-artifact@v1
64+ with :
65+ name : dot_build
66+ path : .build
67+
68+ publish :
69+ name : Publish Docker Images
70+ needs : build
71+ runs-on : ubuntu-latest
72+ steps :
73+ - name : Set up Go 1.x
74+ uses : actions/setup-go@v2
75+ with :
76+ go-version : ^1.14
77+ id : go
78+
79+ - name : Check out code into the Go module directory
80+ uses : actions/checkout@v2
81+
82+ - name : Install promu
83+ run : make promu
84+
85+ - name : Docker Version
86+ run : docker version
87+
88+ - name : Download .build artifacts from Build Step
89+ uses : actions/download-artifact@v1
90+ with :
91+ name : dot_build
92+
4693 - name : Build Docker Images
4794 run : make docker DOCKER_REPO=docker.io/slashdevops
4895
4996 - name : Docker Tag Images Latest
5097 run : make docker-tag-latest DOCKER_REPO=docker.io/slashdevops
5198
52- - name : Show Docker Images
99+ - name : Show Local Docker Images
53100 run : docker images
54101
55102 - name : Loging in Docker Hub
56103 run : echo ${{ secrets.DOCKER_HUB_PASSWORD }} | docker login -u ${{ secrets.DOCKER_HUB_USER }} --password-stdin
57104
58- - name : Publish images in Docker Hub
105+ - name : Publish Images in Docker Hub
59106 run : make docker-publish DOCKER_REPO=$DOCKER_HUB_REPO
60107
61- - name : Publish manifest in Docker Hub
62- run : make docker-manifest DOCKER_REPO=$DOCKER_HUB_REPO
63-
64- - name : Build Tarballs Files
65- run : promu crossbuild tarballs
66-
67- - name : Checksum Tarballs Files
68- run : promu checksum .tarballs
69-
70- - name : Release Tarballs Files
71- run : promu release .tarballs
72- env :
73- GITHUB_TOKEN : ${{secrets.GITHUB_TOKEN}}
74-
75- - name : Upload artifacts to Github
76- uses : actions/upload-artifact@v1
77- with :
78- name : releases
79- path : .tarballs
108+ - name : Publish Manifest in Docker Hub
109+ run : make docker-manifest DOCKER_REPO=$DOCKER_HUB_REPO
0 commit comments