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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  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-file: .java-version
  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: Setup Gradle
  31. uses: gradle/actions/setup-gradle@d9336dac04dea2507a617466bc058a3def92b18b # v3.4.0
  32. - name: Build Docker image
  33. run: ./gradlew :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-file: .java-version
  48. - name: Login to GitHub package registry
  49. uses: azure/docker-login@v2
  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: Setup Gradle
  57. uses: gradle/actions/setup-gradle@d9336dac04dea2507a617466bc058a3def92b18b # v3.4.0
  58. - name: Build Docker image
  59. run: ./gradlew :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. }}