Skip to content

Commit 095a4a6

Browse files
authored
Add release pipeline (#915)
Signed-off-by: Tamal Saha <tamal@appscode.com>
1 parent 6692605 commit 095a4a6

File tree

2 files changed

+45
-6
lines changed

2 files changed

+45
-6
lines changed

.github/workflows/release.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Release
2+
3+
on:
4+
create:
5+
tags:
6+
- v*.*.*
7+
8+
jobs:
9+
10+
build:
11+
name: Build
12+
runs-on: ubuntu-latest
13+
steps:
14+
15+
- name: Check out code into the Go module directory
16+
uses: actions/checkout@v1
17+
18+
- name: Print version info
19+
id: semver
20+
run: |
21+
make version
22+
23+
- name: Set up Docker Buildx
24+
id: buildx
25+
uses: crazy-max/ghaction-docker-buildx@master
26+
with:
27+
version: latest
28+
29+
- name: Available platforms
30+
run: echo ${{ steps.buildx.outputs.platforms }}
31+
32+
- name: Build
33+
env:
34+
DOCKER_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
35+
USERNAME: 1gtm
36+
APPSCODE_ENV: prod
37+
run: |
38+
docker login --username ${USERNAME} --password ${DOCKER_TOKEN}
39+
make release

Makefile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -125,12 +125,12 @@ all-container: $(addprefix container-, $(subst /,_, $(DOCKER_PLATFORMS)))
125125
all-push: $(addprefix push-, $(subst /,_, $(DOCKER_PLATFORMS)))
126126

127127
version:
128-
@echo version=$(VERSION)
129-
@echo version_strategy=$(version_strategy)
130-
@echo git_tag=$(git_tag)
131-
@echo git_branch=$(git_branch)
132-
@echo commit_hash=$(commit_hash)
133-
@echo commit_timestamp=$(commit_timestamp)
128+
@echo ::set-output name=version::$(VERSION)
129+
@echo ::set-output name=version_strategy::$(version_strategy)
130+
@echo ::set-output name=git_tag::$(git_tag)
131+
@echo ::set-output name=git_branch::$(git_branch)
132+
@echo ::set-output name=commit_hash::$(commit_hash)
133+
@echo ::set-output name=commit_timestamp::$(commit_timestamp)
134134

135135
DOCKER_REPO_ROOT := /go/src/$(GO_PKG)/$(REPO)
136136

0 commit comments

Comments
 (0)