Skip to content

Blog Docker CI/CD

Blog Docker CI/CD #46

Workflow file for this run

name: Blog Docker CI/CD
on:
workflow_dispatch:
pull_request:
branches:
- main
jobs:
runtest:
runs-on: ubuntu-latest
steps:
# Checkout the repository
- 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 Docker image
run: docker build --no-cache -t lazycatlabs/blog . --platform linux/amd64
# Push the Docker image to Docker Hub
- name: Push Docker image
run: docker push lazycatlabs/blog