|
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 | + paths-ignore: |
| 34 | + - '**/*.md' |
| 35 | + - 'doc/**' |
| 36 | + # SapMachine 2020-11-04: Trigger on pull request |
| 37 | + pull_request: |
| 38 | + branches: |
| 39 | + - sapmachine |
32 | 40 | workflow_dispatch: |
33 | 41 | inputs: |
34 | 42 | platforms: |
|
57 | 65 |
|
58 | 66 | prepare: |
59 | 67 | name: 'Prepare the run' |
| 68 | + # 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. |
| 69 | + if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name }} |
60 | 70 | runs-on: ubuntu-24.04 |
61 | 71 | env: |
62 | 72 | # List of platforms to exclude by default |
@@ -102,7 +112,8 @@ jobs: |
102 | 112 | function check_platform() { |
103 | 113 | if [[ $GITHUB_EVENT_NAME == workflow_dispatch ]]; then |
104 | 114 | input='${{ github.event.inputs.platforms }}' |
105 | | - elif [[ $GITHUB_EVENT_NAME == push ]]; then |
| 115 | + # SapMachine 2022-06-24: Also handle 'pull_request' event. |
| 116 | + elif [[ $GITHUB_EVENT_NAME == push ]] || [[ $GITHUB_EVENT_NAME == pull_request ]]; then |
106 | 117 | if [[ '${{ !secrets.JDK_SUBMIT_FILTER || startsWith(github.ref, 'refs/heads/submit/') }}' == 'false' ]]; then |
107 | 118 | # If JDK_SUBMIT_FILTER is set, and this is not a "submit/" branch, don't run anything |
108 | 119 | >&2 echo 'JDK_SUBMIT_FILTER is set and not a "submit/" branch' |
@@ -164,11 +175,23 @@ jobs: |
164 | 175 | return |
165 | 176 | fi |
166 | 177 |
|
| 178 | + # SapMachine 2025-07-14: Add sapmachine branch |
| 179 | + if [[ $BRANCH == "sapmachine" ]]; then |
| 180 | + echo 'true' |
| 181 | + return |
| 182 | + fi |
| 183 | +
|
167 | 184 | # ...same for stabilization branches |
168 | 185 | if [[ $BRANCH =~ "jdk(.*)" ]]; then |
169 | 186 | echo 'true' |
170 | 187 | return |
171 | 188 | fi |
| 189 | +
|
| 190 | + # SapMachine 2025-07-14: Add sapmachine* branches |
| 191 | + if [[ $BRANCH =~ "sapmachine([0-9]+)" ]]; then |
| 192 | + echo 'true' |
| 193 | + return |
| 194 | + fi |
172 | 195 | fi |
173 | 196 |
|
174 | 197 | echo 'false' |
|
0 commit comments