Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/scripts/api_deploy.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ def create_pr_or_update_branch_on_api_repo(

# Generate a branch name if not provided
if not branch_name:
branch_name = f"{repo_name}-{version}"
branch_name = f"{repo_name}"

# Create PR using GitHub API (requires GitHub token)
github_token = os.environ.get('GITHUB_TOKEN')
Expand Down
22 changes: 20 additions & 2 deletions .github/workflows/api_docs_gen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,28 @@ on:
dir:
type: string
default: .
version:
type: string
default: ${{ github.ref_name }}
repo:
type: string
default: ${{ github.repository }}
repo_name:
type: string
default: ${{ github.event.repository.name }}
dry_run:
type: boolean
default: false

jobs:
generate_api_docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: true
repository: ${{ inputs.repo }}
ref: ${{ inputs.version }}
- uses: actions/setup-python@v4
with:
python-version: 3.x
Expand All @@ -34,8 +50,10 @@ jobs:
- run: pipx install conan>=2.20.0
- run: pip install -r ${{ inputs.dir }}/docs/requirements.txt gitpython requests
- run: conan config install https://github.com/libhal/conan-config2.git
- run: conan hal docs --doc_version ${{ github.ref_name }} ${{ inputs.dir }}/docs
- run: conan hal docs --doc_version ${{ inputs.version }} ${{ inputs.dir }}/docs
- run: wget https://raw.githubusercontent.com/libhal/ci/5.x.y/.github/scripts/api_deploy.py
- run: python api_deploy.py deploy --version ${{ github.ref_name }} --repo-name ${{ github.event.repository.name }} --docs-dir ${{ inputs.dir }}/docs/build/
- name: Deploy to API repo
if: ${{ inputs.dry_run == false }}
run: python api_deploy.py deploy --version ${{ inputs.version }} --repo-name ${{ inputs.repo_name }} --docs-dir ${{ inputs.dir }}/docs/build/
env:
GITHUB_TOKEN: ${{ secrets.API_PUSH_TOKEN }}
27 changes: 27 additions & 0 deletions .github/workflows/self_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ jobs:
runs-on: ubuntu-24.04
outputs:
library_check: ${{ steps.filter.outputs.library_check }}
api_docs: ${{ steps.filter.outputs.api_docs }}
lint: ${{ steps.filter.outputs.lint }}
docs: ${{ steps.filter.outputs.docs }}
package_and_upload_all: ${{ steps.filter.outputs.package_and_upload_all }}
Expand All @@ -43,6 +44,8 @@ jobs:
id: filter
with:
filters: |
api_docs:
- '.github/workflows/api_docs_gen.yml'
library_check:
- '.github/workflows/library_check.yml'
tests:
Expand All @@ -57,6 +60,30 @@ jobs:
app_builder2:
- '.github/workflows/app_builder2.yml'

api_strong_ptr:
needs: changes
if: ${{ needs.changes.outputs.api_docs == 'true' }}
uses: ./.github/workflows/api_docs_gen.yml
with:
repo_name: strong_ptr
repo: libhal/strong_ptr
dir: .
dry_run: true
version: main
secrets: inherit

api_libhal_v4:
needs: changes
if: ${{ needs.changes.outputs.api_docs == 'true' }}
uses: ./.github/workflows/api_docs_gen.yml
with:
repo_name: libhal
repo: libhal/libhal
dir: v4
dry_run: true
version: main
secrets: inherit

library_check_libhal_v4:
needs: changes
if: ${{ needs.changes.outputs.library_check == 'true' }}
Expand Down