Skip to content

Added pipeline badge to README #5

Added pipeline badge to README

Added pipeline badge to README #5

Workflow file for this run

name: Build and Push Docker Image
on:
push:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Log in to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build Docker images
run: |
IMAGE_BASE=${{ secrets.DOCKERHUB_USERNAME }}/myhello
docker build -t $IMAGE_BASE:latest -t $IMAGE_BASE:${{ github.sha }} .
- name: Push Docker images
run: |
IMAGE_BASE=${{ secrets.DOCKERHUB_USERNAME }}/myhello
docker push $IMAGE_BASE:latest
docker push $IMAGE_BASE:${{ github.sha }}