added lastActive field to userProfileProto and added login info for a… #157
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: Docker-Publish | |
on: | |
push: | |
# Publish `release` as Docker `latest` image. | |
branches: | |
- master | |
# Publish `v1.2.3` tags as releases. | |
tags: | |
- v* | |
# Run tests for any PRs. | |
pull_request: | |
env: | |
# TODO: Change variable to your image's name. | |
IMAGE_NAME: kotlang-auth | |
IMAGE_TAG: ${{ github.sha }} | |
jobs: | |
build-service: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: true | |
- name: Set up Go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: 1.21 | |
- name: Install protoc | |
run: sudo apt install -y protobuf-compiler | |
- name: Install go-grpc | |
run: | | |
go get -u google.golang.org/protobuf/cmd/protoc-gen-go | |
go install google.golang.org/protobuf/cmd/protoc-gen-go | |
go get -u google.golang.org/grpc/cmd/protoc-gen-go-grpc | |
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc | |
echo "${HOME}/go/bin" >> $GITHUB_PATH | |
echo "Path is ${GITHUB_PATH}" | |
- name: Build | |
run: ./build.sh | |
- name: Build docker image | |
run: docker build -t navachar/$IMAGE_NAME:$IMAGE_TAG . | |
- name: Login to Docker Hub | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Push image | |
run: | | |
if [ "${{ github.ref }}" == "refs/heads/master" ]; then | |
docker push navachar/$IMAGE_NAME:$IMAGE_TAG | |
fi |