|
38 | 38 | # we'll reject such dependant PRs and send a PR ourselves. |
39 | 39 | - '!dependabot/**' |
40 | 40 | - 'dependabot/maven/build-dependencies-**' |
| 41 | + # Allow calling this workflow from the scheduler |
| 42 | + workflow_call: |
| 43 | + inputs: |
| 44 | + branch: |
| 45 | + required: true |
| 46 | + type: string |
| 47 | + # Allow running this workflow manually |
| 48 | + workflow_dispatch: |
41 | 49 |
|
42 | 50 | concurrency: |
43 | 51 | group: "workflow = ${{ github.workflow }}, ref = ${{ github.event.ref }}, pr = ${{ github.event.pull_request.id }}" |
|
86 | 94 | - name: Support longpaths on Windows |
87 | 95 | if: "startsWith(matrix.os.runs-on, 'windows')" |
88 | 96 | run: git config --global core.longpaths true |
89 | | - - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # 6.0.0 |
| 97 | + - name: Checkout ${{ inputs.branch }} |
| 98 | + uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # 6.0.0 |
90 | 99 | with: |
| 100 | + ref: ${{ inputs.branch }} |
91 | 101 | persist-credentials: false |
92 | 102 | - name: Set up Java ${{ matrix.os.java.version }} |
93 | 103 | uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # 5.0.0 |
@@ -140,5 +150,17 @@ jobs: |
140 | 150 | name: build-scan-data-incontainer-${{ matrix.os.name }} |
141 | 151 | path: ~/.m2/.develocity/build-scan-data |
142 | 152 |
|
| 153 | + - name: Notify the build failure |
| 154 | + if: ${{ failure() && github.repository == 'hibernate/hibernate-validator'}} |
| 155 | + uses: zulip/github-actions-zulip/send-message@e4c8f27c732ba9bd98ac6be0583096dea82feea5 # v1.0.2 |
| 156 | + with: |
| 157 | + api-key: ${{ secrets.ZULIP_GITHUB_WORKFLOW_NOTIFICATION_API_KEY }} |
| 158 | + email: ${{ secrets.ZULIP_GITHUB_WORKFLOW_NOTIFICATION_EMAIL }} |
| 159 | + organization-url: "https://hibernate.zulipchat.com" |
| 160 | + type: "stream" |
| 161 | + to: "hibernate-validator-dev" |
| 162 | + topic: "GitHub workflow failures" |
| 163 | + content: "The GitHub [build #${{github.run_id}}](https://github.com/hibernate/hibernate-validator/actions/runs/${{github.run_id}}) failed and requires your attention :warning:" |
| 164 | + |
143 | 165 | - name: Omit produced artifacts from build cache |
144 | 166 | run: rm -r ~/.m2/repository/org/hibernate/validator |
0 commit comments