Skip to content

Commit

Permalink
Update build-docker.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
jifollan authored and GitHub Enterprise committed Mar 20, 2025
1 parent 9727b05 commit c7582fb
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions .github/workflows/build-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,29 +26,29 @@ jobs:
username: ${{ secrets.DOCKER_USERNAME }} # Store Docker Hub username in GitHub secrets
password: ${{ secrets.DOCKER_PASSWORD }} # Store Docker Hub password in GitHub secrets

# Step 3: Build the Backend Docker image
# Step 4: Build the Backend Docker image
- name: Build Backend Docker image
run: |
sudo docker build -t jonafoll/backend:${{ github.sha }} ./backend
sudo docker tag jonafoll/backend:${{ github.sha }} jonafoll/backend:latest
docker build --network=host -t jonafoll/backend:${{ github.sha }} ./backend
docker tag jonafoll/backend:${{ github.sha }} jonafoll/backend:latest
# Step 4: Build the Frontend Docker image
# Step 5: Build the Frontend Docker image
- name: Build Frontend Docker image
run: |
sudo docker build -t jonafoll/frontend:${{ github.sha }} ./frontend
sudo docker tag jonafoll/frontend:${{ github.sha }} jonafoll/frontend:latest
docker build --network=host -t jonafoll/frontend:${{ github.sha }} ./frontend
docker tag jonafoll/frontend:${{ github.sha }} jonafoll/frontend:latest
# Step 5: Push the Backend Docker image to Docker Hub
# Step 6: Push the Backend Docker image to Docker Hub
- name: Push Backend Docker image to Docker Hub
run: |
sudo docker push jonafoll/backend:${{ github.sha }}
sudo docker push jonafoll/backend:latest
docker push jonafoll/backend:${{ github.sha }}
docker push jonafoll/backend:latest
# Step 6: Push the Frontend Docker image to Docker Hub
# Step 7: Push the Frontend Docker image to Docker Hub
- name: Push Frontend Docker image to Docker Hub
run: |
sudo docker push jonafoll/frontend:${{ github.sha }}
sudo docker push jonafoll/frontend:latest
docker push jonafoll/frontend:${{ github.sha }}
docker push jonafoll/frontend:latest
deploy:
runs-on: [self-hosted]
Expand Down

0 comments on commit c7582fb

Please sign in to comment.