Update hooks.js #2
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: | |
- main # Adjust this if your main branch has a different name | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
# Checkout the repository code | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
# Set up Docker | |
- 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 -t StudyWizApp . | |
# Tag the Docker image | |
- name: Tag Docker image | |
run: docker tag StudyWizApp:latest ${{ secrets.DOCKER_USERNAME }}/StudyWizApp:latest | |
# Push the Docker image to Docker Hub | |
- name: Push Docker image to Docker Hub | |
run: docker push ${{ secrets.DOCKER_USERNAME }}/StudyWizApp:latest |