Skip to content

Commit c828cfc

Browse files
committed
Added action
1 parent 1e94c46 commit c828cfc

File tree

4 files changed

+417
-187
lines changed

4 files changed

+417
-187
lines changed

β€Ž.github/workflows/doc-update.ymlβ€Ž

Lines changed: 0 additions & 176 deletions
This file was deleted.
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: Example Usage of CodeBoarding Action
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
test_repo:
7+
description: 'Repository URL to test with'
8+
required: false
9+
default: 'https://github.com/CodeBoarding/insights-core'
10+
type: string
11+
schedule:
12+
# Run daily at 2 AM UTC
13+
- cron: '0 2 * * *'
14+
15+
jobs:
16+
update-docs-action-usage:
17+
runs-on: ubuntu-latest
18+
permissions:
19+
contents: write
20+
pull-requests: write
21+
22+
steps:
23+
- name: Checkout repository
24+
uses: actions/checkout@v4
25+
with:
26+
token: ${{ secrets.GITHUB_TOKEN }}
27+
28+
- name: Fetch CodeBoarding Documentation
29+
id: codeboarding
30+
uses: ./ # Use the local action (when this is published, users would use: owner/repo@version)
31+
with:
32+
endpoint_url: ${{ vars.CODEBOARDING_ENDPOINT || 'http://0.0.0.0:8000/generate_docs' }}
33+
repository_url: ${{ github.event.inputs.test_repo || '' }}
34+
output_directory: '.codeboarding'
35+
36+
- name: Display Action Results
37+
run: |
38+
echo "Files created: ${{ steps.codeboarding.outputs.files_created }}"
39+
echo "Output directory: ${{ steps.codeboarding.outputs.output_directory }}"
40+
echo "Has changes: ${{ steps.codeboarding.outputs.has_changes }}"
41+
42+
- name: Create Pull Request
43+
if: steps.git-changes.outputs.has_git_changes == 'true'
44+
uses: peter-evans/create-pull-request@v5
45+
with:
46+
token: ${{ secrets.GITHUB_TOKEN }}
47+
commit-message: "docs: update codeboarding documentation"
48+
title: "πŸ“š CodeBoarding Documentation Update"
49+
body: |
50+
## πŸ“š Documentation Update
51+
52+
This PR contains updated documentation files fetched from the CodeBoarding service.
53+
54+
### πŸ“Š Summary
55+
- **Files created/updated**: ${{ steps.codeboarding.outputs.files_created }}
56+
- **Output directory**: `${{ steps.codeboarding.outputs.output_directory }}/`
57+
- **Source endpoint**: ${{ vars.CODEBOARDING_ENDPOINT || 'codeboarding endpoint' }}
58+
- **Repository analyzed**: ${{ github.event.inputs.test_repo || github.repository }}
59+
60+
### πŸ” Changes
61+
Files have been updated in the `${{ steps.codeboarding.outputs.output_directory }}/` directory with fresh documentation content.
62+
63+
---
64+
65+
πŸ€– This PR was automatically generated by the CodeBoarding documentation update workflow.
66+
branch: docs/codeboarding-update
67+
base: main
68+
delete-branch: true

0 commit comments

Comments
Β (0)