Merge docker and release actions (#472)
This commit is contained in:
parent
f458524feb
commit
7235accba7
3 changed files with 14 additions and 33 deletions
1
.github/workflows/build.yml
vendored
1
.github/workflows/build.yml
vendored
|
|
@ -2,7 +2,6 @@ name: Build
|
|||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
|
||||
|
|
|
|||
|
|
@ -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 }}
|
||||
29
.github/workflows/release.yml
vendored
29
.github/workflows/release.yml
vendored
|
|
@ -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 }}
|
||||
Loading…
Add table
Add a link
Reference in a new issue