|
23 | 23 | # questions. |
24 | 24 | # |
25 | 25 |
|
26 | | -name: 'OpenJDK GHA Sanity Checks' |
| 26 | +# SapMachine 2022-06-22: Change the name of the GitHub Action |
| 27 | +name: 'SapMachine GHA Sanity Checks' |
27 | 28 |
|
28 | 29 | on: |
29 | 30 | push: |
30 | 31 | branches-ignore: |
31 | 32 | - pr/* |
| 33 | + # SapMachine 2020-11-04: Trigger on pull request |
| 34 | + pull_request: |
| 35 | + branches: |
| 36 | + - sapmachine |
32 | 37 | workflow_dispatch: |
33 | 38 | inputs: |
34 | 39 | platforms: |
|
57 | 62 |
|
58 | 63 | prepare: |
59 | 64 | name: 'Prepare the run' |
| 65 | + # SapMachine 2022-06-23: On 'pull_request' we only want to run GHA if the PR comes from a remote repo. Otherwise we have the run on 'push' already as a check. |
| 66 | + if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name }} |
60 | 67 | runs-on: ubuntu-22.04 |
61 | 68 | env: |
62 | 69 | # List of platforms to exclude by default |
@@ -102,7 +109,8 @@ jobs: |
102 | 109 | function check_platform() { |
103 | 110 | if [[ $GITHUB_EVENT_NAME == workflow_dispatch ]]; then |
104 | 111 | input='${{ github.event.inputs.platforms }}' |
105 | | - elif [[ $GITHUB_EVENT_NAME == push ]]; then |
| 112 | + # SapMachine 2022-06-24: Also handle 'pull_request' event. |
| 113 | + elif [[ $GITHUB_EVENT_NAME == push ]] || [[ $GITHUB_EVENT_NAME == pull_request ]]; then |
106 | 114 | if [[ '${{ !secrets.JDK_SUBMIT_FILTER || startsWith(github.ref, 'refs/heads/submit/') }}' == 'false' ]]; then |
107 | 115 | # If JDK_SUBMIT_FILTER is set, and this is not a "submit/" branch, don't run anything |
108 | 116 | >&2 echo 'JDK_SUBMIT_FILTER is set and not a "submit/" branch' |
@@ -164,11 +172,23 @@ jobs: |
164 | 172 | return |
165 | 173 | fi |
166 | 174 |
|
| 175 | + # SapMachine 2025-07-14: Add sapmachine branch |
| 176 | + if [[ $BRANCH == "sapmachine" ]]; then |
| 177 | + echo 'true' |
| 178 | + return |
| 179 | + fi |
| 180 | +
|
167 | 181 | # ...same for stabilization branches |
168 | 182 | if [[ $BRANCH =~ "jdk(.*)" ]]; then |
169 | 183 | echo 'true' |
170 | 184 | return |
171 | 185 | fi |
| 186 | +
|
| 187 | + # SapMachine 2025-07-14: Add sapmachine* branches |
| 188 | + if [[ $BRANCH =~ "sapmachine([0-9]+)" ]]; then |
| 189 | + echo 'true' |
| 190 | + return |
| 191 | + fi |
172 | 192 | fi |
173 | 193 |
|
174 | 194 | echo 'false' |
|
0 commit comments