|
| 1 | +# Copyright 2023 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 | +# https://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 | + |
| 15 | +name: A workflow for updating the CHANGELOG.md in the root directory |
| 16 | +# Controls when the action will run. |
| 17 | + |
| 18 | +on: |
| 19 | + schedule: |
| 20 | + # * is a special character in YAML so you have to quote this string |
| 21 | + # Run this Github Action every Tuesday at 7 AM UTC |
| 22 | + - cron: '0 7 * * 2' |
| 23 | + |
| 24 | +permissions: |
| 25 | + contents: read |
| 26 | + |
| 27 | +jobs: |
| 28 | + build: |
| 29 | + permissions: |
| 30 | + pull-requests: write # for googleapis/code-suggester |
| 31 | + name: Update Changelog |
| 32 | + runs-on: ubuntu-latest |
| 33 | + # don't run the workflow on forks of googleapis/google-cloud-python |
| 34 | + if: ${{github.repository == 'googleapis/google-cloud-python'}} |
| 35 | + steps: |
| 36 | + - uses: actions/checkout@v3 |
| 37 | + - name: Run bash script to update CHANGELOG.md in the root directory |
| 38 | + run: ./scripts/updatechangelog.sh |
| 39 | + - uses: googleapis/code-suggester@v4 |
| 40 | + env: |
| 41 | + ACCESS_TOKEN: ${{ secrets.YOSHI_CODE_BOT_TOKEN }} |
| 42 | + with: |
| 43 | + command: pr |
| 44 | + force: true |
| 45 | + upstream_owner: googleapis |
| 46 | + upstream_repo: google-cloud-python |
| 47 | + description: 'Update the root changelog' |
| 48 | + title: 'chore: Update the root changelog' |
| 49 | + message: 'chore: Update the root changelog' |
| 50 | + branch: update-changelog |
| 51 | + git_dir: '.' |
0 commit comments