Skip to content

ci

ci #170

Workflow file for this run

name: ci
on:
push:
branches:
- docker-push
release:
types:
- published
workflow_dispatch:
jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Get the version
id: get_version
run: echo "##[set-output name=version;]$(if [ ${GITHUB_REF_TYPE} = tag ]; then echo ${GITHUB_REF_NAME}; else echo ${GITHUB_SHA}; fi)"
- name: Check out the repo
uses: actions/checkout@v3
-
name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push
run: |
docker build -t gojektech/vernemq:latest -t gojektech/vernemq:${{ steps.get_version.outputs.version }} -f docker/Dockerfile .
docker push gojektech/vernemq:latest
docker push gojektech/vernemq:${{ steps.get_version.outputs.version }}