chore(main): release 0.46.1 (#1558) #481
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 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: bazel-contrib/[email protected] | |
with: | |
# Avoid downloading Bazel every time. | |
bazelisk-cache: true | |
# Store build cache per workflow. | |
disk-cache: ${{ github.workflow }} | |
# Share repository cache between workflows. | |
repository-cache: true | |
- 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@v4 | |
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@v4 | |
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@v7 | |
with: | |
script: | | |
github.rest.issues.addLabels({ | |
issue_number: ${{ steps.code_suggester.outputs.pull }}, | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
labels: ['automerge'] | |
}) | |