Skip to content

🧪 added workflow build dockerhub #1

🧪 added workflow build dockerhub

🧪 added workflow build dockerhub #1

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

Check failure on line 13 in .github/workflows/build-project-dockerhub.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/build-project-dockerhub.yaml

Invalid workflow file

error parsing called workflow ".github/workflows/build-project-dockerhub.yaml" -> "AliMortezaei/ParvazAcavemy/.github/workflows/testing-project.yaml@main" : workflow was not found. See https://docs.github.com/actions/learn-github-actions/reusing-workflows#access-to-reusable-workflows for more information.
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 }}