Skip to content

Commit

Permalink
🧪 added workflow build dockerhub
Browse files Browse the repository at this point in the history
  • Loading branch information
AliMortezaei committed Feb 16, 2024
1 parent 2d84641 commit 7381581
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/build-project-dockerhub.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Build Docker Container and Push to Registery Docker hub

on:
workflow_call:
workflow_dispatch:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
tesing-project:
uses: AliMortezaei/ParvazAcavemy/.github/workflows/testing-project.yaml@main
build:
runs-on: ubuntu-latest
needs: [tesing-project]
env:
PROJECT_NAME: parvaz-academy
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push web
uses: docker/build-push-action@v4
with:
context: ./backend/app/
file: ./backend/app/Dockerfile
cache-from: type=gha
cache-to: type=gha,mode=max
tags: |
mortezaei2/parvaz_academy:latest
mortezaei2/parvaz_academy:${{ github.sha }}-${{ github.run_id }}

0 comments on commit 7381581

Please sign in to comment.