Skip to content

mod:dockerWorkFlow

mod:dockerWorkFlow #2

name: User App Docker Build and Push
on:
push:
branches:
- master
jobs:
docker:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: Set up QEMU
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/apekade_user:latest
-
name: Add build summary
run: |
echo '### 🚀 Docker Build and Push Summary' > $GITHUB_STEP_SUMMARY
echo '' >> $GITHUB_STEP_SUMMARY
echo '🔧 **Build Status**: The Docker image has been successfully built and pushed.' >> $GITHUB_STEP_SUMMARY
echo '' >> $GITHUB_STEP_SUMMARY
echo '🛠️ **Build Context**: .' >> $GITHUB_STEP_SUMMARY
echo '📦 **Image Tag**: ${{ secrets.DOCKERHUB_USERNAME }}/apekade_user:latest' >> $GITHUB_STEP_SUMMARY
echo '' >> $GITHUB_STEP_SUMMARY
echo '🎉 **Thanks for using GitHub Actions!**' >> $GITHUB_STEP_SUMMARY