Skip to content

Commit

Permalink
Add release pipeline (#3)
Browse files Browse the repository at this point in the history
Signed-off-by: Tamal Saha <tamal@appscode.com>
  • Loading branch information
tamalsaha committed Oct 6, 2019
1 parent 75ca782 commit 11da7a1
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 6 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/release.yml
@@ -0,0 +1,39 @@
name: Release

on:
create:
tags:
- '*.*.*'

jobs:

build:
name: Build
runs-on: ubuntu-latest
steps:

- name: Check out code into the Go module directory
uses: actions/checkout@v1

- name: Print version info
id: semver
run: |
make version
- name: Set up Docker Buildx
id: buildx
uses: crazy-max/ghaction-docker-buildx@master
with:
version: latest

- name: Available platforms
run: echo ${{ steps.buildx.outputs.platforms }}

- name: Build
env:
DOCKER_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
USERNAME: 1gtm
APPSCODE_ENV: prod
run: |
docker login --username ${USERNAME} --password ${DOCKER_TOKEN}
make release
12 changes: 6 additions & 6 deletions Makefile
Expand Up @@ -103,12 +103,12 @@ all-container: $(addprefix container-, $(subst /,_, $(DOCKER_PLATFORMS)))
all-push: $(addprefix push-, $(subst /,_, $(DOCKER_PLATFORMS)))

version:
@echo version=$(VERSION)
@echo version_strategy=$(version_strategy)
@echo git_tag=$(git_tag)
@echo git_branch=$(git_branch)
@echo commit_hash=$(commit_hash)
@echo commit_timestamp=$(commit_timestamp)
@echo ::set-output name=version::$(VERSION)
@echo ::set-output name=version_strategy::$(version_strategy)
@echo ::set-output name=git_tag::$(git_tag)
@echo ::set-output name=git_branch::$(git_branch)
@echo ::set-output name=commit_hash::$(commit_hash)
@echo ::set-output name=commit_timestamp::$(commit_timestamp)

gen:
./hack/codegen.sh
Expand Down

0 comments on commit 11da7a1

Please sign in to comment.