Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: setting up job to sync service_config.proto #1359

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions .github/workflows/service_config_proto_sync.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Copyright 2023 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

on:
workflow_dispatch:
schedule:
# every Sunday morning
- cron: '0 7 * * 0'
name: Synchronize service_config.proto
jobs:
sync_service_config_proto:
runs-on: ubuntu-latest
if: github.repository_owner == 'googleapis'
steps:
- uses: actions/checkout@v2
- name: Download service_config.proto from grpc/grpc-proto master branch
run: |
curl --output gapic-generator-java/src/main/proto/service_config.proto \
https://raw.githubusercontent.com/grpc/grpc-proto/master/grpc/service_config/service_config.proto
- uses: actions/setup-python@v4
with:
python-version: '3.7'
architecture: 'x64'
- run: python3 -m pip install --require-hashes -r .github/requirements.txt
# If there's no changes, code-suggester succeeds without creating a pull request.
- uses: googleapis/code-suggester@v4
env:
ACCESS_TOKEN: ${{ secrets.YOSHI_CODE_BOT_TOKEN }}
with:
command: pr
upstream_owner: googleapis
upstream_repo: gapic-generator-java
description: 'Downloaded latest service_config.proto from github.com/grpc/grpc-proto repository'
title: 'chore: sync service_config.proto from grpc-proto'
message: 'chore: sync service_config.proto from grpc-proto'
branch: update-service_config_proto
primary: main
force: true
git_dir: '.'