publish-smoke-test-fake-backend-images.yml 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. name: Publish fake backend images for smoke tests
  2. on:
  3. push:
  4. paths:
  5. - "smoke-tests/images/fake-backend/**"
  6. - ".github/workflows/publish-smoke-test-fake-backend-images.yml"
  7. branches:
  8. - main
  9. workflow_dispatch:
  10. jobs:
  11. publishLinux:
  12. runs-on: ubuntu-latest
  13. steps:
  14. - uses: actions/checkout@v4
  15. - name: Free disk space
  16. run: .github/scripts/gha-free-disk-space.sh
  17. - name: Set up JDK for running Gradle
  18. uses: actions/setup-java@v4
  19. with:
  20. distribution: temurin
  21. java-version: 17.0.6
  22. - name: Login to GitHub package registry
  23. uses: docker/login-action@v3
  24. with:
  25. registry: ghcr.io
  26. username: ${{ github.repository_owner }}
  27. password: ${{ secrets.GITHUB_TOKEN }}
  28. - name: Set tag
  29. run: echo "TAG=$(date '+%Y%m%d').$GITHUB_RUN_ID" >> $GITHUB_ENV
  30. - name: Build Docker image
  31. uses: gradle/gradle-build-action@v2
  32. with:
  33. arguments: ":smoke-tests:images:fake-backend:jib -Djib.httpTimeout=120000 -Djib.console=plain -PextraTag=${{ env.TAG }}"
  34. publishWindows:
  35. runs-on: windows-latest
  36. defaults:
  37. run:
  38. shell: bash
  39. steps:
  40. - name: Support long paths
  41. run: git config --system core.longpaths true
  42. - uses: actions/checkout@v4
  43. - name: Set up JDK for running Gradle
  44. uses: actions/setup-java@v4
  45. with:
  46. distribution: temurin
  47. java-version: 17.0.6
  48. - name: Login to GitHub package registry
  49. uses: azure/docker-login@v1
  50. with:
  51. login-server: ghcr.io
  52. username: ${{ github.repository_owner }}
  53. password: ${{ secrets.GITHUB_TOKEN }}
  54. - name: Set tag
  55. run: echo "TAG=$(date '+%Y%m%d').$GITHUB_RUN_ID" >> $GITHUB_ENV
  56. - name: Build Docker image
  57. uses: gradle/gradle-build-action@v2
  58. with:
  59. arguments: ":smoke-tests:images:fake-backend:dockerPush -PextraTag=${{ env.TAG }}"
  60. workflow-notification:
  61. needs:
  62. - publishLinux
  63. - publishWindows
  64. if: always()
  65. uses: ./.github/workflows/reusable-workflow-notification.yml
  66. with:
  67. success: >-
  68. ${{
  69. needs.publishLinux.result == 'success' &&
  70. needs.publishWindows.result == 'success'
  71. }}