feat: add docker image on release and master (#135)

* feat: add docker image on release and master

* resolves return on the PR

* Add Installation docker doc

* Update .github/workflows/publish.yml

Co-authored-by: Derek Smith <derek@clokwork.net>

* Resovle PR conversations

* No v in RawVersion

Co-authored-by: Derek Smith <derek@clokwork.net>
This commit is contained in:
Anthony MARQUES 2021-04-01 17:41:35 +02:00 committed by GitHub
parent 8d9e00b699
commit 2307bff72f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 69 additions and 1 deletions

35
.github/workflows/publish.yml vendored Normal file
View file

@ -0,0 +1,35 @@
name: publish
on:
push:
branches:
- master
env:
GO_VERSION: "1.16"
DOCKER_REGISTRY: "quay.io"
jobs:
goreleaser:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: ${{ env.GO_VERSION }}
- name: Build go binary
run: make build
- name: Login to GitHub Packages Docker Registry
uses: docker/login-action@v1
with:
registry: ${{ env.DOCKER_REGISTRY }}
username: ${{ secrets.QUAY_IO_USER }}
password: ${{ secrets.QUAY_IO_TOKEN }}
- name: Build and Push docker image
run: |
docker build --pull --tag ${{ env.DOCKER_REGISTRY }}/git-chglog/git-chglog:edge .
docker push ${{ env.DOCKER_REGISTRY }}/git-chglog/git-chglog:edge