Skip to content

Example Usage of CodeBoarding Action #9

Example Usage of CodeBoarding Action

Example Usage of CodeBoarding Action #9

Workflow file for this run

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