forked from grpc-ecosystem/grpc-gateway
-
Notifications
You must be signed in to change notification settings - Fork 0
77 lines (77 loc) · 2.81 KB
/
renovate.yml
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
73
74
75
76
77
on:
push:
branches:
- renovate/*
permissions:
contents: read
name: renovate
jobs:
update_repositoriesbzl:
container:
image: docker.pkg.github.com/grpc-ecosystem/grpc-gateway/build-env:1.19
options: "--user root"
credentials:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
with:
fetch-depth: 0
token: ${{ secrets.GH_PUSH_TOKEN }}
- uses: actions/cache@69d9d449aced6a2ede0bc19182fadc3a0a42d2b0 # v3
with:
path: /home/vscode/.cache/_grpc_gateway_bazel
key: v1-bazel-cache-${{ hashFiles('repositories.bzl') }}
restore-keys: v1-bazel-cache-
- name: Configure bazel
run: |
cat > .bazelrc << EOF
startup --output_base /home/vscode/.cache/_grpc_gateway_bazel
build --test_output errors
build --features race
# Protobuf v3.22.0+ requires C++14
build --repo_env=BAZEL_CXXOPTS=-std=c++14
# Workaround https://github.com/bazelbuild/bazel/issues/3645
# See https://docs.bazel.build/versions/0.23.0/command-line-reference.html
build --local_ram_resources=7168 # Github runners have 7G of memory
build --local_cpu_resources=2 # Github runners have 2 vCPU
EOF
- run: bazel run //:gazelle -- update-repos -from_file=go.mod -to_macro=repositories.bzl%go_repositories
- run: |
git add .
if output=$(git status --porcelain) && [ ! -z "$output" ]; then
git config user.name "Renovate Bot"
git config user.email "[email protected]"
git commit --amend --no-edit
git push --force-with-lease origin ${{ github.ref_name }}
fi
regenerate:
container:
image: docker.pkg.github.com/grpc-ecosystem/grpc-gateway/build-env:1.19
options: "--user root"
credentials:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
runs-on: ubuntu-latest
needs:
# Run after update_repositoriesbzl to avoid
# git conflicts
- update_repositoriesbzl
steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
with:
fetch-depth: 0
token: ${{ secrets.GH_PUSH_TOKEN }}
- run: make install
- run: make clean
- run: make generate
- run: go mod tidy
- run: |
git add .
if output=$(git status --porcelain) && [ ! -z "$output" ]; then
git config user.name "Renovate Bot"
git config user.email "[email protected]"
git commit --amend --no-edit
git push --force-with-lease origin ${{ github.ref_name }}
fi