Update build-project-dockerhub.yaml #7
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 | ||
Check failure on line 13 in .github/workflows/build-project-dockerhub.yaml GitHub Actions / .github/workflows/build-project-dockerhub.yamlInvalid workflow file
|
||
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 }} |