Skip to content

Commit

Permalink
Create githubpublish.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
wlanboy authored Nov 14, 2020
1 parent 421a9fb commit 94a8d05
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/githubpublish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Docker build and publish image to github
on:
push:
tags:
- '*g'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.13
uses: actions/setup-go@v1
with:
go-version: 1.13
id: go

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

- name: Get dependencies
run: |
go get -v -t -d ./...
if [ -f Gopkg.toml ]; then
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
dep ensure
fi
- name: Build
run: go build -v .

- name: Build and publish Docker Image to GitHub Packages Registry
uses: VaultVulp/gp-docker-action@1.1.7
with:
github-token: ${{ github.token }}
image-name: goservice
image-tag: latest
extract-git-tag: false
dockerfile: Dockerfile
build-context: .
pull-image: false

0 comments on commit 94a8d05

Please sign in to comment.