push_to_docker.yml 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. name: publish donet project to Dokcer Hub
  2. on:
  3. push:
  4. branches: [ master ]
  5. paths-ignore:
  6. - '**/README.md'
  7. - '**/*.yml'
  8. pull_request:
  9. branches: [ master ]
  10. jobs:
  11. build-reactapp:
  12. runs-on: ubuntu-latest
  13. defaults:
  14. run:
  15. working-directory: AgileConfig.Server.UI/react-ui-antd
  16. strategy:
  17. matrix:
  18. node-version: [12.x]
  19. steps:
  20. - uses: actions/checkout@v4
  21. - name: Use Node.js ${{ matrix.node-version }}
  22. uses: actions/setup-node@v1
  23. with:
  24. node-version: ${{ matrix.node-version }}
  25. - run: npm install
  26. - run: npm run build
  27. - uses: actions/upload-artifact@v2
  28. with:
  29. name: agileconfig-ui
  30. path: AgileConfig.Server.UI/react-ui-antd/dist/
  31. build-dotnet:
  32. needs: build-reactapp
  33. runs-on: ubuntu-latest
  34. steps:
  35. - uses: actions/checkout@v4
  36. - name: Setup .NET Core
  37. uses: actions/setup-dotnet@v1
  38. with:
  39. dotnet-version: 3.1.301
  40. - name: Install dependencies
  41. run: dotnet restore
  42. - name: Build
  43. run: dotnet build --configuration Release --no-restore
  44. - uses: actions/download-artifact@v2
  45. with:
  46. name: agileconfig-ui
  47. path: AgileConfig.Server.Apisite/wwwroot/ui
  48. - name: Push to Docker Hub
  49. uses: docker/build-push-action@v1
  50. with:
  51. username: ${{ secrets.DOCKER_HUB_NAME }}
  52. password: ${{ secrets.DOCKER_HUB_PASSWORD }}
  53. repository: kklldog/agile_config
  54. tags: test