Skip to content

Build and Push Docker Image #5

Build and Push Docker Image

Build and Push Docker Image #5

name: Build and Push Docker Image
on:
push:
branches: [ "master" ]
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
# Checkout the repository code
- name: Checkout code
uses: actions/checkout@v4
# Log in to Docker Hub
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
# Build the Docker image
- name: Build Base Docker image
run: |
docker build -t eckii24/dev-base:latest -f ./.config/setup-scripts/base.Dockerfile --progress=plain .
# Push the Docker image to Docker Hub
- name: Push Base Docker image
run: |
docker push eckii24/dev-base:latest