Skip to content

Merge pull request #36 from Funtech-3/refactor/registration #2

Merge pull request #36 from Funtech-3/refactor/registration

Merge pull request #36 from Funtech-3/refactor/registration #2

name: Funtech build and call deploy
on:
push:
branches: [ 'main', 'dev']
paths-ignore:
- "**/README.md"
workflow_dispatch:
jobs:
build_backend_and_push_to_docker_hub:
name: Push backend Docker image to DockerHub
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Docker
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Push to DockerHub
uses: docker/build-push-action@v4
with:
context: ./backend/
push: true
tags: ${{ secrets.DOCKER_USERNAME }}/${{ secrets.PROJECT_NAME }}_backend:latest
build_gateway_and_push_to_docker_hub:
name: Push gateway Docker image to DockerHub
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Docker
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Push to DockerHub
uses: docker/build-push-action@v4
with:
context: ./nginx/
push: true
tags: ${{ secrets.DOCKER_USERNAME }}/${{ secrets.PROJECT_NAME }}_gateway:latest
deploy_uses_other_file:
if:
contains('
refs/heads/develop
refs/heads/main
', github.ref)
uses: Funtech-3/backend/.github/workflows/deploy.yml@dev

Check failure on line 58 in .github/workflows/build_and_push.yml

View workflow run for this annotation

GitHub Actions / Funtech build and call deploy

Invalid workflow file

error parsing called workflow ".github/workflows/build_and_push.yml" -> "Funtech-3/backend/.github/workflows/deploy.yml@dev" : failed to fetch workflow: workflow was not found.

Check failure on line 58 in .github/workflows/build_and_push.yml

View workflow run for this annotation

GitHub Actions / Funtech build and call deploy

Invalid workflow file

error parsing called workflow ".github/workflows/build_and_push.yml" -> "Funtech-3/backend/.github/workflows/deploy.yml@dev" : failed to fetch workflow: workflow was not found.
needs:
- build_backend_and_push_to_docker_hub
- build_gateway_and_push_to_docker_hub
secrets: inherit