Skip to content

Merge pull request #409 from factly/enable-recovery #133

Merge pull request #409 from factly/enable-recovery

Merge pull request #409 from factly/enable-recovery #133

Workflow file for this run

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 }}