Update Dockerfile #12
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 # Trigger the workflow on push to the main branch on: push: branches: - main # Define the jobs jobs: build-and-push: runs-on: ubuntu-latest steps: # Checkout the code from the repository - name: Checkout repository uses: actions/checkout@v3 # Set up Docker - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 # Log in to Docker Hub using secrets stored in GitHub - name: Log in to Docker Hub uses: docker/login-action@v2 with: username: ${{ secrets.DOCKER_HUB_USERNAME }} password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} # Build and tag the Docker image - name: Build Docker image run: docker build -t ${{ secrets.DOCKER_HUB_USERNAME }}/your-image-name:latest . # Push the Docker image to Docker Hub - name: Push Docker image run: docker push ${{ secrets.DOCKER_HUB_USERNAME }}/your-image-name:latest |