Skip to content

Commit 06b9b13

Browse files
committed
testing master github actions
1 parent 2d491d9 commit 06b9b13

File tree

3 files changed

+126
-23
lines changed

3 files changed

+126
-23
lines changed

.github/workflows/master.yml

Lines changed: 53 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ env:
1818

1919
jobs:
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

.github/workflows/release.yml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: Release workflow
2+
3+
on:
4+
push:
5+
tags:
6+
- v[12].[0-9]+.[0-9]+ # https://help.github.com/es/actions/reference/workflow-syntax-for-github-actions#filter-pattern-cheat-sheet
7+
branches-ignore:
8+
- '**'
9+
10+
env:
11+
DOCKER_HUB_REPO: docker.io/slashdevops
12+
13+
jobs:
14+
15+
build_test_publish:
16+
name: Build Test and Publish Release
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Set up Go 1.x
20+
uses: actions/setup-go@v2
21+
with:
22+
go-version: ^1.14
23+
id: go
24+
25+
- name: Check out code into the Go module directory
26+
uses: actions/checkout@v2
27+
28+
- name: Install promu
29+
run: make promu
30+
31+
- name: Build Cross-Platform
32+
run: promu crossbuild -v
33+
34+
- name: Build Docker Images
35+
run: make docker DOCKER_REPO=docker.io/slashdevops
36+
37+
- name: Docker Tag Images Latest
38+
run: make docker-tag-latest DOCKER_REPO=docker.io/slashdevops
39+
40+
- name: Show Docker Images
41+
run: docker images
42+
43+
- name: Loging in Docker Hub
44+
run: echo ${{ secrets.DOCKER_HUB_PASSWORD }} | docker login -u ${{ secrets.DOCKER_HUB_USER }} --password-stdin
45+
46+
- name: Publish images in Docker Hub
47+
run: make docker-publish DOCKER_REPO=$DOCKER_HUB_REPO
48+
49+
- name: Publish manifest in Docker Hub
50+
run: make docker-manifest DOCKER_REPO=$DOCKER_HUB_REPO
51+
52+
- name: Show Package Information
53+
run: promu info
54+
55+
- name: Build Tarballs Files
56+
run: promu crossbuild tarballs
57+
58+
- name: Checksum Tarballs Files
59+
run: promu checksum .tarballs
60+
61+
- name: Release Tarballs Files
62+
run: promu release -v .tarballs
63+
env:
64+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
65+
66+
- name: Upload artifacts to Github
67+
uses: actions/upload-artifact@v1
68+
with:
69+
name: releases
70+
path: .tarballs

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
## 0.0.1 / 2020-06-14
2+
3+
* [ENHANCEMENT] First Alpha Version

0 commit comments

Comments
 (0)