name: ci

on:
    pull_request:
      branches: [ develop ]
    push:
      branches: [ master, develop ]
      tags:
        - v*

jobs:
    quality:
      uses: ./.github/workflows/quality.yml
    test:
      uses: ./.github/workflows/test.yml
      needs: [quality]
    build:
      if: github.event_name != 'pull_request'
      uses: ./.github/workflows/build.yml
      needs: [quality, test]
    build_docker:
      if: github.event_name != 'pull_request'
      uses: ./.github/workflows/build_docker.yml
      secrets:
        DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
        DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }}
      needs: [quality, test]
