generated from cheqd/.github
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add goreleaser and docker publishing
Signed-off-by: Andrew Nikitin <andrew.nikitin@cheqd.io>
- Loading branch information
Andrew Nikitin
committed
May 20, 2022
1 parent
7940d96
commit 05dea8b
Showing
3 changed files
with
87 additions
and
8 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
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
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,61 @@ | ||
name: "Release" | ||
on: | ||
workflow_call: | ||
inputs: | ||
RELEASE_VERSION: | ||
description: "Release version number" | ||
required: true | ||
type: string | ||
defaults: | ||
run: | ||
shell: bash | ||
|
||
|
||
jobs: | ||
go-releaser: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: Set up Go | ||
uses: actions/setup-go@v2 | ||
- name: Run GoReleaser | ||
uses: goreleaser/goreleaser-action@v2 | ||
with: | ||
# either 'goreleaser' (default) or 'goreleaser-pro' | ||
distribution: goreleaser | ||
version: latest | ||
args: release --rm-dist | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
publish-docker: | ||
name: "Publish Docker images" | ||
runs-on: ubuntu-latest | ||
env: | ||
RELEASE_VERSION: ${{ inputs.VERSION }} | ||
|
||
steps: | ||
- name: Download resolver Docker image | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: cheqd-did-resolver.tar | ||
|
||
- name: Load resolver Docker image | ||
run: docker load -i cheqd-did-resolver.tar | ||
|
||
- name: Login to Container registry | ||
uses: docker/login-action@v1 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Push cheqd-node image | ||
run: | | ||
docker tag cheqd-did-resolver ghcr.io/${{ github.repository }}:${{ env.RELEASE_VERSION }} | ||
docker tag cheqd-did-resolver ghcr.io/${{ github.repository }}:latest | ||
docker push ghcr.io/${{ github.repository }}:${{ env.RELEASE_VERSION }} | ||
docker push ghcr.io/${{ github.repository }}:latest |