Skip to content

Update build-project-dockerhub.yaml #7

Update build-project-dockerhub.yaml

Update build-project-dockerhub.yaml #7

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]
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 }}