Update README.md #10
  
    
      This file contains hidden or 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
    
  
  
    
  | # It automatically builds your Docker image and pushes it to GHCR | |
| name: Build and Push Docker Image | |
| # We will run this workflow every time you push to the 'main' branch | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| jobs: | |
| build-and-push: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write # Give the job permission to write to GHCR | |
| steps: | |
| - name: Checkout repository | |
| 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: Log in to GitHub Container Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| # Step to generate lowercase repository name | |
| - name: Set lowercase repository name | |
| run: echo "repo=${GITHUB_REPOSITORY,,}" >> $GITHUB_ENV | |
| - name: Build and push Docker image | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: . | |
| file: ./Dockerfile | |
| platforms: linux/amd64,linux/arm64 # Build for multiple architectures | |
| push: true | |
| tags: | | |
| ghcr.io/${{ env.repo }}:latest | |
| ghcr.io/${{ env.repo }}:${{ github.sha }} | |