Build and Push Docker Image #5
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: 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 |