Skip to content

Commit f8a5672

Browse files
Also sync other files (#7)
GitOrigin-RevId: 0ed09ca8ec386689c7c827b106f5368532eaba41
1 parent 157c4a3 commit f8a5672

5 files changed

Lines changed: 124 additions & 21 deletions

File tree

.github/workflows/mirror.yaml

Lines changed: 57 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,65 @@
1-
name: Mirror to Public Repository
1+
name: copybara-push
2+
23
on:
34
push:
4-
branches: [ main ]
5+
branches: [main]
56

67
jobs:
7-
mirror:
8+
copy:
9+
if: ${{ github.repository == 'renderinc/skills' }}
810
runs-on: ubuntu-latest
9-
env:
10-
ENABLE_MIRROR: ${{ secrets.ENABLE_MIRROR }}
11-
1211
steps:
13-
- name: Checkout private repository
14-
uses: actions/checkout@v4
15-
if: ${{ env.ENABLE_MIRROR == 'true' }}
12+
- name: Checkout repository
13+
uses: actions/checkout@v6
14+
- uses: actions/setup-java@v5
1615
with:
17-
# Must be set to avoid conflicting with the subsequent push
18-
# https://github.com/ad-m/github-push-action/issues/44#issuecomment-581706892
19-
fetch-depth: 0
20-
persist-credentials: false
21-
22-
- name: Push to public repository
23-
uses: ad-m/github-push-action@v0.8.0
24-
if: ${{ env.ENABLE_MIRROR == 'true' }}
16+
distribution: oracle
17+
java-version: 21
18+
- name: Generate an app token for render-oss
19+
id: generate-token-oss
20+
uses: actions/create-github-app-token@v2
21+
with:
22+
app-id: ${{ vars.APP_ID }}
23+
private-key: ${{ secrets.APP_KEY }}
24+
owner: render-oss
25+
repositories: skills
26+
- name: Generate an app token for renderinc
27+
id: generate-token-renderinc
28+
uses: actions/create-github-app-token@v2
2529
with:
26-
github_token: ${{ secrets.PUBLIC_REPO_TOKEN }}
27-
repository: renderinc/skills
28-
branch: main
29-
force: true
30+
app-id: ${{ vars.APP_ID }}
31+
private-key: ${{ secrets.APP_KEY }}
32+
owner: renderinc
33+
repositories: skills
34+
- name: Get GitHub App User ID
35+
id: get-user-id
36+
env:
37+
GH_TOKEN: ${{ steps.generate-token-renderinc.outputs.token }}
38+
APP_SLUG: ${{ steps.generate-token-renderinc.outputs.app-slug }}
39+
run: echo "user-id=$(gh api "/users/$APP_SLUG[bot]" --jq .id)" >> "$GITHUB_OUTPUT"
40+
- name: Set up credentials
41+
env:
42+
RENDERINC_TOKEN: ${{ steps.generate-token-renderinc.outputs.token }}
43+
RENDER_OSS_TOKEN: ${{ steps.generate-token-oss.outputs.token }}
44+
APP_SLUG: ${{ steps.generate-token-oss.outputs.app-slug }}
45+
USER_ID: ${{ steps.get-user-id.outputs.user-id }}
46+
run: |
47+
echo "https://$USER:$RENDERINC_TOKEN@api.github.com" > ~/.git-credentials
48+
echo "https://$USER:$RENDERINC_TOKEN@github.com" >> ~/.git-credentials
49+
git config --global user.name "$APP_SLUG[bot]"
50+
git config --global user.email "$USER_ID+$APP_SLUG[bot]@users.noreply.github.com"
51+
git config --global url."https://$USER:${RENDERINC_TOKEN}@github.com/renderinc".insteadOf "git@github.com:renderinc"
52+
git config --global url."https://$USER:${RENDERINC_TOKEN}@github.com/renderinc".insteadOf "https://github.com/renderinc"
53+
git config --global url."https://$USER:${RENDER_OSS_TOKEN}@github.com/render-oss".insteadOf "git@github.com:render-oss"
54+
git config --global url."https://$USER:${RENDER_OSS_TOKEN}@github.com/render-oss".insteadOf "https://github.com/render-oss"
55+
- name: Set up copybara
56+
run: |
57+
wget https://github.com/google/copybara/releases/download/v20251215/copybara_deploy.jar
58+
java -jar copybara_deploy.jar version
59+
java -jar copybara_deploy.jar validate copy.bara.sky
60+
- name: Run workflow
61+
env:
62+
RENDER_OSS_TOKEN: ${{ steps.generate-token-oss.outputs.token }}
63+
run: |
64+
java -jar copybara_deploy.jar copy.bara.sky push \
65+
--git-destination-url "https://$USER:$RENDER_OSS_TOKEN@github.com/render-oss/skills.git"

.gitignore

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Claude Code local settings
2+
.claude/settings.local.json
3+
.claude/*.local.md
4+
5+
# macOS
6+
.DS_Store
7+
.AppleDouble
8+
.LSOverride
9+
10+
# Node
11+
node_modules/
12+
npm-debug.log*
13+
yarn-debug.log*
14+
yarn-error.log*
15+
16+
# Python
17+
__pycache__/
18+
*.py[cod]
19+
*.pyo
20+
*.pyd
21+
.Python
22+
*.egg-info/
23+
dist/
24+
build/
25+
26+
# Editor directories and files
27+
.vscode/
28+
.idea/
29+
*.swp
30+
*.swo
31+
*~

.mcp.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"mcpServers": {
3+
"render": {
4+
"type": "http",
5+
"url": "https://mcp.render.com/mcp",
6+
"headers": {
7+
"Authorization": "Bearer ${RENDER_API_KEY}"
8+
}
9+
}
10+
}
11+
}

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2026 Render
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

copy.bara.sky

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ DESTINATION_FILES = [
99
"skills/**",
1010
".github/**",
1111
"copy.bara.sky",
12+
".claude-plugin",
13+
".mcp.json",
14+
"LICENSE",
15+
".gitignore",
1216
"README.md",
1317
]
1418

0 commit comments

Comments
 (0)