Skip to content

Commit d2783c6

Browse files
authored
feat(action): Add publish action (kleveross#135)
1 parent edba88f commit d2783c6

File tree

1 file changed

+52
-0
lines changed

1 file changed

+52
-0
lines changed

.github/workflows/publish.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Publish
2+
3+
on:
4+
push:
5+
# Sequence of patterns matched against refs/tags
6+
tags:
7+
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
8+
9+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
10+
jobs:
11+
ormb-publish:
12+
runs-on:
13+
#- self-hosted
14+
- ubuntu-latest
15+
timeout-minutes: 60
16+
steps:
17+
- name: Set up Go 1.14
18+
uses: actions/setup-go@v1
19+
with:
20+
go-version: 1.14.7
21+
id: go
22+
- uses: actions/checkout@v2
23+
with:
24+
path: src/github.com/kleveross/ormb
25+
- name: setup env
26+
run: |
27+
cd src/github.com/kleveross/ormb
28+
pwd
29+
go env
30+
echo "::set-env name=GOPATH::$(go env GOPATH):$GITHUB_WORKSPACE"
31+
echo "::add-path::$(go env GOPATH)/bin"
32+
- name: before_install
33+
run: |
34+
# get coveralls.io support
35+
go get github.com/kleveross/goveralls
36+
- name: install
37+
run: |
38+
cd src/github.com/kleveross/ormb
39+
go env GOROOT
40+
make build
41+
- name: docker-build
42+
run: |
43+
cd src/github.com/kleveross/ormb
44+
docker build -t ghcr.io/kleveross/klever-ormb:${{ github.ref }} -f build/ormb/Dockerfile .
45+
docker build -t ghcr.io/kleveross/klever-ormb-storage-initializer:${{ github.ref }} -f build/ormb-storage-initializer/Dockerfile .
46+
- name: Login to GitHub Container Registry
47+
run: echo "${{ secrets.GHCR_TOKEN }}" | docker login ghcr.io -u ${{ secrets.GHCR_USERNAME }} --password-stdin
48+
- name: docker-push
49+
run: |
50+
docker push ghcr.io/kleveross/klever-ormb:${{ github.ref }}
51+
docker push ghcr.io/kleveross/klever-ormb-storage-initializer:${{ github.ref }}
52+

0 commit comments

Comments
 (0)