-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6006868
commit c7e3031
Showing
1 changed file
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: Release & Publish | ||
|
||
on: | ||
push: | ||
tags: ["v*.*.**"] | ||
workflow_dispatch: | ||
inputs: | ||
tag: | ||
description: "Target tag to release & publish" | ||
required: true | ||
type: string | ||
|
||
jobs: | ||
release: | ||
name: goreleaser-cross | ||
runs-on: ubuntu-latest | ||
container: | ||
image: ghcr.io/goreleaser/goreleaser-cross:latest | ||
steps: | ||
- uses: actions/checkout@master | ||
with: | ||
ref: "${{ inputs.tag }}" | ||
|
||
- run: goreleaser release | ||
working-directory: "${{ github.workspace }}" | ||
env: | ||
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | ||
|
||
publish: | ||
name: publish images | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@master | ||
with: | ||
ref: "${{ inputs.tag }}" | ||
|
||
- uses: docker/[email protected] | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- uses: docker/[email protected] | ||
with: | ||
push: true | ||
build-args: "VERSION=${{ inputs.tag }}" | ||
tags: "${{ github.repository }}:latest,${{ github.repository }}:${{ inputs.tag }}" |