name: Update Google APIs Commit Hash on: schedule: - cron: '0 0 1 * *' workflow_dispatch: permissions: {} jobs: update_protobuf_version: name: Update protobuf includes to latest commit runs-on: ubuntu-latest permissions: contents: write # required for pushing commits to a branch pull-requests: write # required for creating a new PR steps: - name: Checkout code uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: fetch-depth: 0 persist-credentials: true # zizmor: ignore[artipacked] - name: Extract latest commit hash from googleapis/googleapis and create PR env: RUN_ID: ${{ github.run_id }} GH_TOKEN: ${{ secrets.GOOGLEAPIS_SIGSTOREBOT_TOKEN }} run: | (cd /tmp && git clone --depth=1 https://github.com/googleapis/googleapis) export LATEST_COMMIT_HASH=$(cd /tmp/googleapis && git log -n 1 --format=%H) sed -i "s/^\(DEFAULT_GOOGLEAPIS_COMMIT\s*=\s*\).*/\1${LATEST_COMMIT_HASH}/" protoc-builder/versions.mk make all git config user.name "Sigstore Bot" git config user.email "86837369+sigstore-bot@users.noreply.github.com" git config --global --type bool push.autoSetupRemote true git add -A git checkout -b googleapis-${RUN_ID} git commit -sam "Update GOOGLEAPIS_COMMIT in versions.mk" git push gh pr create --title "build(deps): bump github.com/googleapis/googleapis to latest commit in protoc-builder/versions.mk" \ --body "This pull request updates the DEFAULT_GOOGLEAPIS_COMMIT variable in protoc-builder/versions.mk with the latest commit hash from the googleapis/googleapis repository." \ --base main \ --head googleapis-${RUN_ID} update_grpc_gateway_version: runs-on: ubuntu-latest name: Update gRPC Gateway OpenAPI v2 includes to latest commit permissions: contents: write # required for pushing commits to a branch pull-requests: write # required for creating a new PR steps: - name: Checkout code uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: fetch-depth: 0 persist-credentials: true # zizmor: ignore[artipacked] - name: Extract latest commit hash from grpc-ecosystem/grpc-gateway and create PR env: RUN_ID: ${{ github.run_id }} GH_TOKEN: ${{ secrets.GOOGLEAPIS_SIGSTOREBOT_TOKEN }} run: | (cd /tmp && git clone --depth=1 https://github.com/grpc-ecosystem/grpc-gateway) export LATEST_COMMIT_HASH=$(cd /tmp/grpc-gateway && git log -n 1 --format=%H) sed -i "s/^\(DEFAULT_GRPC_GATEWAY_COMMIT\s*=\s*\).*/\1${LATEST_COMMIT_HASH}/" protoc-builder/versions.mk make all git config user.name "Sigstore Bot" git config user.email "86837369+sigstore-bot@users.noreply.github.com" git config --global --type bool push.autoSetupRemote true git add -A git checkout -b grpc-gateway-${RUN_ID} git commit -sam "Update GRPC_GATEWAY_COMMIT in versions.mk" git push gh pr create --title "build(deps): bump github.com/grpc-ecosystem/grpc-gateway to latest commit in protoc-builder/versions.mk" \ --body "This pull request updates the DEFAULT_GRPC_GATEWAY_COMMIT variable in protoc-builder/versions.mk with the latest commit hash from the grpc-ecosystem/grpc-gateway repository." \ --base main \ --head grpc-gateway-${RUN_ID}