summaryrefslogtreecommitdiff
path: root/third_party/googleapis/.github/workflows
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/googleapis/.github/workflows')
-rw-r--r--third_party/googleapis/.github/workflows/diregapic.yaml50
-rw-r--r--third_party/googleapis/.github/workflows/generate_api_index.yaml33
2 files changed, 0 insertions, 83 deletions
diff --git a/third_party/googleapis/.github/workflows/diregapic.yaml b/third_party/googleapis/.github/workflows/diregapic.yaml
deleted file mode 100644
index 7e1d3db..0000000
--- a/third_party/googleapis/.github/workflows/diregapic.yaml
+++ /dev/null
@@ -1,50 +0,0 @@
----
-name: DIREGAPIC Updater
-on: # yamllint disable-line rule:truthy
- schedule:
- - cron: '19 */8 * * *'
- workflow_dispatch:
-
-jobs:
- regenerate-compute:
- runs-on: ubuntu-latest
- container: gcr.io/gapic-images/googleapis:20220711
- steps:
- - name: Checkout master
- uses: actions/checkout@v3
- with:
- ref: master
- - name: Download discovery docs
- run: |
- curl https://www.googleapis.com/discovery/v1/apis/compute/v1/rest --output google/cloud/compute/v1/compute.v1.json
- echo compute_revision=$(grep -oP '"revision":\s*"\d+"' google/cloud/compute/v1/compute.v1.json | grep -oP '\d+') >> $GITHUB_ENV
- - name: Regenerate API definitions
- run: |
- bazel build //google/cloud/compute/v1:compute_gen
- cp bazel-bin/google/cloud/compute/v1/compute_gen.proto google/cloud/compute/v1/compute.proto
- bazel build //google/cloud/compute/v1:compute_grpc_service_config_gen
- cp bazel-bin/google/cloud/compute/v1/compute_grpc_service_config_gen.json google/cloud/compute/v1/compute_grpc_service_config.json
- bazel build //google/cloud/compute/v1:compute_gapic_gen
- cp bazel-bin/google/cloud/compute/v1/compute_gapic_gen.yaml google/cloud/compute/v1/compute_gapic.yaml
- echo api_changes=$(git diff-index --shortstat HEAD) >> $GITHUB_ENV
- - name: Build GAPIC clients
- if: contains(env.api_changes, 'file')
- run: |
- bazel build //google/cloud/compute/v1/...
- bazel build //google/cloud/compute/v1/...
- - name: Create PR
- uses: googleapis/code-suggester@v2
- env:
- ACCESS_TOKEN: ${{ secrets.YOSHI_CODE_BOT_TOKEN }}
- with:
- command: pr
- upstream_owner: googleapis
- upstream_repo: googleapis
- title: 'feat: [DIREGAPIC] Update API definitions'
- description: 'feat: Update Compute Engine API to revision ${{ env.compute_revision }}'
- message: 'feat: Update Compute Engine API to revision ${{ env.compute_revision }}'
- primary: 'master'
- branch: diregapic
- git_dir: '.'
- force: true
- fork: true
diff --git a/third_party/googleapis/.github/workflows/generate_api_index.yaml b/third_party/googleapis/.github/workflows/generate_api_index.yaml
deleted file mode 100644
index 24b3fc2..0000000
--- a/third_party/googleapis/.github/workflows/generate_api_index.yaml
+++ /dev/null
@@ -1,33 +0,0 @@
-name: Generate API Index
-on: # yamllint disable-line rule:truthy
- push:
- branches: [master]
- workflow_dispatch:
-jobs:
- build:
- runs-on: ubuntu-latest
- steps:
- - name: Setup .NET Core SDK
- uses: actions/setup-dotnet@v1.8.0
- - name: Checkout googleapis (this repository)
- uses: actions/checkout@v2
- with:
- path: googleapis
- - name: Checkout index generator
- uses: actions/checkout@v2
- with:
- repository: googleapis/googleapis-api-index-generator
- path: gen
- - name: Generate API index
- run: |
- gen/scripts/generate-schema.sh
- gen/scripts/generate-index.sh $PWD/googleapis
- cp gen/tmp/api-index-v1.json $PWD/googleapis
- - name: Commit API index
- run: |
- cd googleapis
- [[ ! $(git diff --exit-code api-index-v1.json) ]] && echo "Nothing to commit." && exit 0
- git config user.name "Google APIs"
- git add api-index-v1.json
- git commit -m "chore: regenerate API index"
- git push