Merge pull request #36 from Funtech-3/refactor/registration #2
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: 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 GitHub Actions / Funtech build and call deployInvalid workflow file
Check failure on line 58 in .github/workflows/build_and_push.yml GitHub Actions / Funtech build and call deployInvalid workflow file
|
||
needs: | ||
- build_backend_and_push_to_docker_hub | ||
- build_gateway_and_push_to_docker_hub | ||
secrets: inherit |