forked from googleapis/gapic-generator-go
-
Notifications
You must be signed in to change notification settings - Fork 0
72 lines (72 loc) · 2.33 KB
/
deps.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
---
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: 5.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@v2
- 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@v2
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@v2
with:
ref: main
- uses: actions/download-artifact@v2
with:
name: repositories
- name: Expand repositories archive
run: |
tar xvzf repos.tgz
rm repos.tgz
- uses: googleapis/code-suggester@v2
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'
labels: |
automerge
branch: update-bazel-deps
git_dir: '.'
force: true