Merge docker and release actions (#472)

This commit is contained in:
andig 2020-11-24 08:27:41 +01:00 • committed by GitHub
parent f458524feb
commit 7235accba7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 33 deletions

View file

@ -2,7 +2,6 @@ name: Build
on:
push:
pull_request:
jobs:

View file

@ -1,4 +1,4 @@
name: Docker
name: Publish
on:
workflow_run:
@ -6,11 +6,13 @@ on:
- Build
types:
- completed
branch:
- master
jobs:
docker:
name: Docker
publish:
name: Publish
runs-on: ubuntu-latest
steps:
@ -31,3 +33,12 @@ jobs:
- name: Build release
if: startsWith(github.ref, 'refs/tags/')
run: make publish-release
- name: GoReleaser
uses: goreleaser/goreleaser-action@v2
if: startsWith(github.ref, 'refs/tags/')
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View file

@ -1,29 +0,0 @@
name: Release
on:
workflow_run:
workflows:
- Build
types:
- completed
tags:
- '*'
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}