chore(deps): bump google.golang.org/grpc in /showcase #417
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: Generator dependency management | |
on: | |
push: | |
paths: | |
- go.mod | |
- go.sum | |
- showcase/go.mod | |
- showcase/go.sum | |
workflow_dispatch: {} # Allow manual triggering | |
jobs: | |
update-bazel-deps: | |
if: github.ref == 'refs/heads/main' | |
outputs: | |
changed: ${{ steps.update.outputs.changed }} | |
runs-on: ubuntu-latest | |
env: | |
USE_BAZEL_VERSION: 6.0.0 | |
container: gcr.io/gapic-images/googleapis:latest | |
# Dockerfile for this image: https://github.com/googleapis/googleapis-discovery/blob/master/Dockerfile | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Run gazelle update-repos | |
id: update | |
run: | | |
bazelisk run //:gazelle -- update-repos -from_file=go.mod -prune -to_macro=repositories.bzl%com_googleapis_gapic_generator_go_repositories | |
sed -i "s/ \"go_repository\",//g" repositories.bzl | |
bazelisk run //:gazelle -- update-repos -from_file=showcase/go.mod -to_macro=repositories.bzl%com_googleapis_gapic_generator_go_repositories | |
sed -i "s/ \"go_repository\",//g" repositories.bzl | |
set +e | |
git diff --exit-code repositories.bzl | |
echo ::set-output name=changed::$? | |
set -e | |
- name: Prepare repositories.bzl payload | |
if: steps.update.outputs.changed | |
run: tar czf repos.tgz repositories.bzl | |
- uses: actions/upload-artifact@v3 | |
if: steps.update.outputs.changed | |
with: | |
name: repositories | |
path: repos.tgz | |
repositories-pr: | |
needs: update-bazel-deps | |
runs-on: ubuntu-latest | |
if: needs.update-bazel-deps.outputs.changed | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: main | |
- uses: actions/download-artifact@v3 | |
with: | |
name: repositories | |
- name: Expand repositories archive | |
run: | | |
tar xvzf repos.tgz | |
rm repos.tgz | |
- uses: googleapis/code-suggester@v4 | |
id: code_suggester | |
env: | |
ACCESS_TOKEN: ${{ secrets.YOSHI_CODE_BOT_TOKEN }} | |
with: | |
command: pr | |
upstream_owner: googleapis | |
upstream_repo: gapic-generator-go | |
description: 'Updated Go dependencies for Bazel repositories.' | |
title: 'chore(bazel): update Bazel Go deps' | |
message: 'chore(bazel): update Bazel Go deps' | |
primary: 'main' | |
branch: update-bazel-deps | |
git_dir: '.' | |
force: true | |
- name: Add automerge label to pull request | |
uses: actions/github-script@v6 | |
with: | |
script: | | |
github.rest.issues.addLabels({ | |
issue_number: ${{ steps.code_suggester.outputs.pull }}, | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
labels: ['automerge'] | |
}) | |