Merge pull request #428 from factly/add-token-info-endpoint #142
Workflow file for this run
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
name: Release CI | |
on: | |
push: | |
tags: | |
- "*" | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set env | |
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | |
- name: Use Go | |
uses: actions/setup-go@v2 | |
id: setup_go | |
with: | |
go-version: "1.18" | |
- name: Cache go-modules | |
uses: actions/cache@v1 | |
with: | |
path: ~/go/pkg/mod | |
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
- name: Login Docker Hub | |
run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u deshetti --password-stdin | |
- name: Build and push kavach web | |
uses: docker/build-push-action@v2 | |
with: | |
push: true | |
tags: | | |
factly/kavach-web:${{ env.RELEASE_VERSION }} | |
factly/kavach-web:latest | |
context: web | |
file: web/Dockerfile.prod | |
- name: Build and push kavach web (development) | |
uses: docker/build-push-action@v2 | |
with: | |
push: true | |
tags: | | |
factly/kavach-web:${{ env.RELEASE_VERSION }}-dev | |
factly/kavach-web:latest-dev | |
context: web | |
file: web/Dockerfile | |
- name: Run GoReleaser | |
uses: goreleaser/goreleaser-action@v2 | |
with: | |
distribution: goreleaser | |
version: latest | |
args: release --rm-dist | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |