publish-smoke-test-servlet-images.yml 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. name: Publish Servlet images for smoke tests
  2. on:
  3. push:
  4. paths:
  5. - 'smoke-tests/images/servlet/**'
  6. - '.github/workflows/publish-smoke-test-servlet-images.yml'
  7. branches:
  8. - main
  9. workflow_dispatch:
  10. jobs:
  11. publish:
  12. runs-on: ${{ matrix.os }}
  13. defaults:
  14. run:
  15. shell: bash # this is needed for TAG construction below on Windows
  16. strategy:
  17. matrix:
  18. os:
  19. - windows-2019
  20. - ubuntu-latest
  21. smoke-test-server:
  22. - jetty
  23. - liberty
  24. - payara
  25. - tomcat
  26. - tomee
  27. - websphere
  28. - wildfly
  29. exclude:
  30. - os: windows-2019
  31. smoke-test-server: websphere
  32. fail-fast: false
  33. steps:
  34. - name: Support longpaths
  35. run: git config --system core.longpaths true
  36. if: matrix.os == 'windows-2019'
  37. - uses: actions/checkout@v3
  38. - name: Set up JDK for running Gradle
  39. uses: actions/setup-java@v2
  40. with:
  41. distribution: temurin
  42. java-version: 17
  43. - name: Login to GitHub Package Registry
  44. uses: docker/login-action@v1.10.0
  45. with:
  46. registry: ghcr.io
  47. username: ${{ github.repository_owner }}
  48. password: ${{ secrets.GITHUB_TOKEN }}
  49. - name: Set Tag
  50. run: echo "TAG=$(date '+%Y%m%d').$GITHUB_RUN_ID" >> $GITHUB_ENV
  51. - name: Set up gradle cache
  52. uses: gradle/gradle-build-action@v2
  53. with:
  54. # only push cache for one matrix option per OS since github action cache space is limited
  55. cache-read-only: ${{ inputs.cache-read-only || matrix.smoke-test-suite != 'tomcat' }}
  56. - name: Build Linux docker images
  57. if: matrix.os != 'windows-2019'
  58. run: ./gradlew buildLinuxTestImages pushMatrix -PextraTag=${{ env.TAG }} -PsmokeTestServer=${{ matrix.smoke-test-server }}
  59. working-directory: smoke-tests/images/servlet
  60. - name: Build Windows docker images
  61. if: matrix.os == 'windows-2019'
  62. run: ./gradlew buildWindowsTestImages pushMatrix -PextraTag=${{ env.TAG }} -PsmokeTestServer=${{ matrix.smoke-test-server }}
  63. working-directory: smoke-tests/images/servlet
  64. issue:
  65. name: Open issue on failure
  66. needs: publish
  67. if: failure()
  68. uses: ./.github/workflows/reusable-create-issue-for-failure.yml