-
Notifications
You must be signed in to change notification settings - Fork 1
67 lines (56 loc) · 2.45 KB
/
example-usage.yml
File metadata and controls
67 lines (56 loc) · 2.45 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: Example Usage of CodeBoarding Action
on:
workflow_dispatch:
inputs:
test_repo:
description: 'Repository URL to test with'
required: false
default: 'https://github.com/CodeBoarding/insights-core'
type: string
schedule:
# Run daily at 2 AM UTC
- cron: '0 2 * * *'
jobs:
update-docs-action-usage:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Fetch CodeBoarding Documentation
id: codeboarding
uses: ./ # Use the local action (when this is published, users would use: owner/repo@version)
with:
repository_url: ${{ github.repository }}
output_directory: '.codeboarding'
- name: Display Action Results
run: |
echo "Files created: ${{ steps.codeboarding.outputs.files_created }}"
echo "Output directory: ${{ steps.codeboarding.outputs.output_directory }}"
echo "Has changes: ${{ steps.codeboarding.outputs.has_changes }}"
- name: Create Pull Request
if: steps.git-changes.outputs.has_git_changes == 'true'
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "docs: update codeboarding documentation"
title: "📚 CodeBoarding Documentation Update"
body: |
## 📚 Documentation Update
This PR contains updated documentation files fetched from the CodeBoarding service.
### 📊 Summary
- **Files created/updated**: ${{ steps.codeboarding.outputs.files_created }}
- **Output directory**: `${{ steps.codeboarding.outputs.output_directory }}/`
- **Source endpoint**: ${{ vars.CODEBOARDING_ENDPOINT || 'codeboarding endpoint' }}
- **Repository analyzed**: ${{ github.event.inputs.test_repo || github.repository }}
### 🔍 Changes
Files have been updated in the `${{ steps.codeboarding.outputs.output_directory }}/` directory with fresh documentation content.
---
🤖 This PR was automatically generated by the CodeBoarding documentation update workflow.
branch: docs/codeboarding-update
base: main
delete-branch: true