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

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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@v3
  15. - name: Set up JDK for running Gradle
  16. uses: actions/setup-java@v2
  17. with:
  18. distribution: temurin
  19. java-version: 17
  20. - name: Login to GitHub Package Registry
  21. uses: docker/login-action@v1.10.0
  22. with:
  23. registry: ghcr.io
  24. username: ${{ github.repository_owner }}
  25. password: ${{ secrets.GITHUB_TOKEN }}
  26. - name: Set Tag
  27. run: echo "TAG=$(date '+%Y%m%d').$GITHUB_RUN_ID" >> $GITHUB_ENV
  28. - name: Build Docker Image
  29. uses: gradle/gradle-build-action@v2
  30. with:
  31. arguments: jib -Djib.httpTimeout=120000 -Djib.console=plain -PextraTag=${{ env.TAG }}
  32. build-root-directory: smoke-tests/images/fake-backend
  33. publishWindows:
  34. runs-on: windows-2019
  35. defaults:
  36. run:
  37. shell: bash
  38. steps:
  39. - name: Support longpaths
  40. run: git config --system core.longpaths true
  41. - uses: actions/checkout@v3
  42. - name: Set up JDK 11 for running Gradle
  43. uses: actions/setup-java@v2
  44. with:
  45. distribution: temurin
  46. java-version: 11
  47. - name: Login to GitHub Package Registry
  48. uses: azure/docker-login@v1
  49. with:
  50. login-server: ghcr.io
  51. username: ${{ github.repository_owner }}
  52. password: ${{ secrets.GITHUB_TOKEN }}
  53. - name: Set Tag
  54. run: echo "TAG=$(date '+%Y%m%d').$GITHUB_RUN_ID" >> $GITHUB_ENV
  55. - name: Build Docker Image
  56. uses: gradle/gradle-build-action@v2
  57. with:
  58. arguments: dockerPush -PextraTag=${{ env.TAG }}
  59. build-root-directory: smoke-tests/images/fake-backend
  60. issue:
  61. name: Open issue on failure
  62. needs: [ publishLinux, publishWindows ]
  63. if: failure()
  64. uses: ./.github/workflows/reusable-create-issue-for-failure.yml