Update README.md #14
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 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] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@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/ | |
file: ./backend/Dockerfile | |
push: true | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
tags: | | |
mortezaei2/parvaz_academy:latest | |
mortezaei2/parvaz_academy:${{ github.sha }}-${{ github.run_id }} |