You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

57 lines
1.5 KiB

  1. name: catalog-api
  2. on:
  3. workflow_dispatch:
  4. push:
  5. branches:
  6. - dev
  7. paths:
  8. - src/BuildingBlocks/**
  9. - src/Services/Catalog/**
  10. - .github/workflows/catalog-api.yml
  11. pull_request:
  12. branches:
  13. - dev
  14. paths:
  15. - src/BuildingBlocks/**
  16. - src/Services/Catalog/**
  17. - .github/workflows/catalog-api.yml
  18. env:
  19. SERVICE: catalog-api
  20. IMAGE: catalog.api
  21. DOTNET_VERSION: 5.0.x
  22. PROJECT_PATH: Services/Catalog/Catalog.API
  23. TESTS_PATH: Services/Catalog/Catalog.UnitTests
  24. jobs:
  25. BuildContainersForPR_Linux:
  26. runs-on: ubuntu-latest
  27. if: ${{ github.event_name == 'pull_request' }}
  28. steps:
  29. - name: Checkout code
  30. uses: actions/checkout@v2
  31. - uses: ./.github/workflows/composite/build-test
  32. with:
  33. service: ${{ env.SERVICE }}
  34. registry_endpoint: ${{ secrets.REGISTRY_ENDPOINT }}
  35. dotnet_version: ${{ env.DOTNET_VERSION }}
  36. project_path: ${{ env.PROJECT_PATH }}
  37. tests_path: ${{ env.TESTS_PATH }}
  38. BuildLinux:
  39. runs-on: ubuntu-latest
  40. if: ${{ github.event_name != 'pull_request' }}
  41. steps:
  42. - name: Checkout code
  43. uses: actions/checkout@v2
  44. - uses: ./.github/workflows/composite/build-push
  45. with:
  46. service: ${{ env.SERVICE }}
  47. registry_host: ${{ secrets.REGISTRY_HOST }}
  48. registry_endpoint: ${{ secrets.REGISTRY_ENDPOINT }}
  49. image_name: ${{ env.IMAGE }}
  50. registry_username: ${{ secrets.USERNAME }}
  51. registry_password: ${{ secrets.PASSWORD }}