Skip to content

Commit

Permalink
feat(action): Add publish action
Browse files Browse the repository at this point in the history
  • Loading branch information
simon-cj committed Sep 28, 2020
1 parent edba88f commit d44f5d6
Showing 1 changed file with 52 additions and 0 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Publish

on:
push:
# Sequence of patterns matched against refs/tags
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
ormb-publish:
runs-on:
#- self-hosted
- ubuntu-latest
timeout-minutes: 60
steps:
- name: Set up Go 1.14
uses: actions/setup-go@v1
with:
go-version: 1.14.7
id: go
- uses: actions/checkout@v2
with:
path: src/github.com/kleveross/ormb
- name: setup env
run: |
cd src/github.com/kleveross/ormb
pwd
go env
echo "::set-env name=GOPATH::$(go env GOPATH):$GITHUB_WORKSPACE"
echo "::add-path::$(go env GOPATH)/bin"
- name: before_install
run: |
# get coveralls.io support
go get github.com/kleveross/goveralls
- name: install
run: |
cd src/github.com/kleveross/ormb
go env GOROOT
make build
- name: docker-build
run: |
cd src/github.com/kleveross/ormb
docker build -t ghcr.io/kleveross/klever-ormb:${{ github.ref }} -f build/ormb/Dockerfile .
docker build -t ghcr.io/kleveross/klever-ormb-storage-initializer:${{ github.ref }} -f build/ormb-storage-initializer/Dockerfile .
- name: Login to GitHub Container Registry
run: echo "${{ secrets.GHCR_TOKEN }}" | docker login ghcr.io -u ${{ secrets.GHCR_USERNAME }} --password-stdin
- name: docker-push
run: |
docker push ghcr.io/kleveross/klever-ormb:${{ github.ref }}
docker push ghcr.io/kleveross/klever-ormb-storage-initializer:${{ github.ref }}

0 comments on commit d44f5d6

Please sign in to comment.