|  | 
| 1 |  | -# Copyright 2024 Google LLC | 
|  | 1 | +## Copyright 2024 Google LLC | 
|  | 2 | +## | 
|  | 3 | +## Licensed under the Apache License, Version 2.0 (the "License"); | 
|  | 4 | +## you may not use this file except in compliance with the License. | 
|  | 5 | +## You may obtain a copy of the License at | 
|  | 6 | +## | 
|  | 7 | +##      http://www.apache.org/licenses/LICENSE-2.0 | 
|  | 8 | +## | 
|  | 9 | +## Unless required by applicable law or agreed to in writing, software | 
|  | 10 | +## distributed under the License is distributed on an "AS IS" BASIS, | 
|  | 11 | +## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 
|  | 12 | +## See the License for the specific language governing permissions and | 
|  | 13 | +## limitations under the License. | 
|  | 14 | +## GitHub action job to test core java library features on | 
|  | 15 | +## downstream client libraries before they are released. | 
|  | 16 | +#name: Hermetic library generation upon generation config change through pull requests | 
|  | 17 | +#on: | 
|  | 18 | +#  pull_request: | 
| 2 | 19 | # | 
| 3 |  | -# Licensed under the Apache License, Version 2.0 (the "License"); | 
| 4 |  | -# you may not use this file except in compliance with the License. | 
| 5 |  | -# You may obtain a copy of the License at | 
| 6 |  | -# | 
| 7 |  | -#      http://www.apache.org/licenses/LICENSE-2.0 | 
| 8 |  | -# | 
| 9 |  | -# Unless required by applicable law or agreed to in writing, software | 
| 10 |  | -# distributed under the License is distributed on an "AS IS" BASIS, | 
| 11 |  | -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 
| 12 |  | -# See the License for the specific language governing permissions and | 
| 13 |  | -# limitations under the License. | 
| 14 |  | -# GitHub action job to test core java library features on | 
| 15 |  | -# downstream client libraries before they are released. | 
| 16 |  | -name: Hermetic library generation upon generation config change through pull requests | 
| 17 |  | -on: | 
| 18 |  | -  pull_request: | 
| 19 |  | - | 
| 20 |  | -env: | 
| 21 |  | -  REPO_FULL_NAME: ${{ github.event.pull_request.head.repo.full_name }} | 
| 22 |  | -  GITHUB_REPOSITORY: ${{ github.repository }} | 
| 23 |  | -jobs: | 
| 24 |  | -  library_generation: | 
| 25 |  | -    runs-on: ubuntu-latest | 
| 26 |  | -    steps: | 
| 27 |  | -    - name: Determine whether the pull request comes from a fork | 
| 28 |  | -      run: | | 
| 29 |  | -        if [[ "${GITHUB_REPOSITORY}" != "${REPO_FULL_NAME}" ]]; then | 
| 30 |  | -          echo "This PR comes from a fork. Skip library generation." | 
| 31 |  | -          echo "SHOULD_RUN=false" >> $GITHUB_ENV | 
| 32 |  | -        else | 
| 33 |  | -          echo "SHOULD_RUN=true" >> $GITHUB_ENV | 
| 34 |  | -        fi | 
| 35 |  | -    - uses: actions/checkout@v4 | 
| 36 |  | -      if: env.SHOULD_RUN == 'true' | 
| 37 |  | -      with: | 
| 38 |  | -        fetch-depth: 0 | 
| 39 |  | -        token: ${{ secrets.CLOUD_JAVA_BOT_TOKEN }} | 
| 40 |  | -    - uses : googleapis/sdk-platform-java/.github/[email protected] | 
| 41 |  | -      if: env.SHOULD_RUN == 'true' | 
| 42 |  | -      with: | 
| 43 |  | -        base_ref: ${{ github.base_ref }} | 
| 44 |  | -        head_ref: ${{ github.head_ref }} | 
| 45 |  | -        token: ${{ secrets.CLOUD_JAVA_BOT_TOKEN }} | 
|  | 20 | +#env: | 
|  | 21 | +#  REPO_FULL_NAME: ${{ github.event.pull_request.head.repo.full_name }} | 
|  | 22 | +#  GITHUB_REPOSITORY: ${{ github.repository }} | 
|  | 23 | +#jobs: | 
|  | 24 | +#  library_generation: | 
|  | 25 | +#    runs-on: ubuntu-latest | 
|  | 26 | +#    steps: | 
|  | 27 | +#    - name: Determine whether the pull request comes from a fork | 
|  | 28 | +#      run: | | 
|  | 29 | +#        if [[ "${GITHUB_REPOSITORY}" != "${REPO_FULL_NAME}" ]]; then | 
|  | 30 | +#          echo "This PR comes from a fork. Skip library generation." | 
|  | 31 | +#          echo "SHOULD_RUN=false" >> $GITHUB_ENV | 
|  | 32 | +#        else | 
|  | 33 | +#          echo "SHOULD_RUN=true" >> $GITHUB_ENV | 
|  | 34 | +#        fi | 
|  | 35 | +#    - uses: actions/checkout@v4 | 
|  | 36 | +#      if: env.SHOULD_RUN == 'true' | 
|  | 37 | +#      with: | 
|  | 38 | +#        fetch-depth: 0 | 
|  | 39 | +#        token: ${{ secrets.CLOUD_JAVA_BOT_TOKEN }} | 
|  | 40 | +#    - uses: googleapis/sdk-platform-java/.github/[email protected] | 
|  | 41 | +#      if: env.SHOULD_RUN == 'true' | 
|  | 42 | +#      with: | 
|  | 43 | +#        base_ref: ${{ github.base_ref }} | 
|  | 44 | +#        head_ref: ${{ github.head_ref }} | 
|  | 45 | +#        token: ${{ secrets.CLOUD_JAVA_BOT_TOKEN }} | 
0 commit comments