forked from googleapis/google-cloud-ruby
-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (44 loc) · 1.61 KB
/
new-library.yml
File metadata and controls
48 lines (44 loc) · 1.61 KB
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
name: Create New Library
on:
workflow_dispatch:
inputs:
protoPath:
description: "The path to the protos and build file"
required: true
jobs:
NewLibrary:
if: ${{ github.repository == 'googleapis/google-cloud-ruby' }}
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.YOSHI_CODE_BOT_TOKEN }}
steps:
- name: Checkout repo
uses: actions/checkout@v6
with:
# IMPORTANT: This ensures the checkout uses the correct identity for git operations
token: ${{ secrets.YOSHI_CODE_BOT_TOKEN }}
# - name: Debug Token Permissions
# # Uncomment to debug access token issues
# env:
# GH_TOKEN: ${{ secrets.YOSHI_CODE_BOT_TOKEN }}
# run: |
# echo "=== 1. Who does this token belong to? ==="
# gh api user --jq .login
# echo "=== 2. What scopes does this token have? ==="
# gh api user -i 2>&1 | grep -i "x-oauth-scopes" || echo "Could not determine scopes"
# echo "=== 3. Can I see the target fork? ==="
# gh repo view yoshi-code-bot/google-cloud-ruby --json viewerPermission
- name: Install Ruby 3.3
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.3"
- name: Install Bazel
uses: bazel-contrib/setup-bazel@0.18.0
- name: Install tools
run: |
gem install --no-document toys
- name: Create library
run: |
toys new-library -v --bazelisk --pull --pull-googleapis --test --fork --bootstrap-releases ${GITHUB_EVENT_INPUTS_PROTOPATH}
env:
GITHUB_EVENT_INPUTS_PROTOPATH: ${{ github.event.inputs.protoPath }}