-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (40 loc) · 1.22 KB
/
bazel-steward.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
---
name: Bazel Steward
on:
workflow_dispatch:
schedule:
- cron: "30 5 * * *" # runs every day at 5:30 am
jobs:
bazel-steward:
strategy:
matrix:
workspace-root:
- "."
- "examples"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Generate GitHub Apps token
uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ secrets.BAZEL_STEWARD_APP_ID }}
private-key: ${{ secrets.BAZEL_STEWARD_APP_PRIVATE_KEY }}
- name: Generate config file to modify branch name
shell: bash
run: |
prefix=$(echo "${WORKSPACE_ROOT}" | base64 | sed 's/=/_/g')
cat << EOS > bazel-steward.yaml
---
pull-requests:
- branch-prefix: "bazel-steward-${prefix}/"
EOS
env:
WORKSPACE_ROOT: ${{ matrix.workspace-root }}
- uses: VirtusLab/bazel-steward@v1
with:
github-token: ${{ steps.app-token.outputs.token }}
# Workaround for multiple workspaces (cf. https://github.com/VirtusLab/bazel-steward/issues/40)
additional-args: ${{ matrix.workspace-root }}