Skip to content

Update docker-build-push.yaml #8

Update docker-build-push.yaml

Update docker-build-push.yaml #8

name: Build and Push Docker Image
on:
push:
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build Docker Image
run: |
docker build -t ${{ secrets.DOCKERHUB_USERNAME }}/myapp:latest .
- name: Push Docker Image
run: docker image push ${{ secrets.DOCKERHUB_USERNAME }}/myapp:latest