Skip to content

Login to Docker Hub, build and push container #2

Login to Docker Hub, build and push container

Login to Docker Hub, build and push container #2

Workflow file for this run

name: Docker CD Pipeline
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
-
name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}
-
name: Build and push
uses: docker/build-push-action@v5
with:
context: exercise_3
push: true
tags: ${{ secrets.DOCKER_USERNAME }}/my-app:latest