added badge for action run #13
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: CI Pipeline for OHIP Streaming Client | |
on: | |
push: | |
branches: | |
- "main" | |
paths: | |
- ".github/workflows/ci-ohip.yml" | |
- "src/**" | |
env: | |
REPO: streaming-client | |
NAMESPACE: luisw19 | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set IMAGE_TAG environment variable | |
id: set_image_tag | |
run: | | |
IMAGE_TAG=$(git rev-parse --short=7 ${{ github.sha }}) | |
echo "IMAGE_TAG=${IMAGE_TAG}" >> $GITHUB_ENV | |
- name: Login to Docker Hub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_PASSWORD }} | |
- name: Build and push Docker image | |
uses: docker/build-push-action@v2 | |
env: | |
IMAGE_TAG: ${{ env.IMAGE_TAG }} | |
with: | |
context: . | |
push: true | |
file: ./Dockerfile | |
tags: ${{ env.NAMESPACE }}/${{ env.REPO }}:${{ env.IMAGE_TAG }} |