Skip to content

Merge pull request #46 from LibreCodeCoop/feat/publish-typescript-nod… #16

Merge pull request #46 from LibreCodeCoop/feat/publish-typescript-nod…

Merge pull request #46 from LibreCodeCoop/feat/publish-typescript-nod… #16

# SPDX-FileCopyrightText: 2026 LibreCode coop and contributors
# SPDX-License-Identifier: AGPL-3.0-or-later
name: Publish workflow catalog
on:
workflow_dispatch:
push:
branches:
- main
paths:
- 'workflow-templates/**'
- 'workflow-catalog.json'
- 'scripts/sync_catalog.py'
- '.github/workflows/publish-workflow-catalog.yml'
permissions:
contents: read
jobs:
publish:
name: Publish organization workflow catalog
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Validate GitHub App configuration
env:
WORKFLOW_APP_ID: ${{ vars.LIBRECODE_WORKFLOW_APP_ID }}
WORKFLOW_APP_PRIVATE_KEY: ${{ secrets.LIBRECODE_WORKFLOW_APP_PRIVATE_KEY }}
run: |
if [ -z "$WORKFLOW_APP_ID" ]; then
echo "::error::LIBRECODE_WORKFLOW_APP_ID is not configured."
exit 1
fi
if [ -z "$WORKFLOW_APP_PRIVATE_KEY" ]; then
echo "::error::LIBRECODE_WORKFLOW_APP_PRIVATE_KEY is not configured."
exit 1
fi
- name: Create GitHub App token
id: app-token
uses: actions/create-github-app-token@67018539274d69449ef7c02e8e71183d1719ab42 # v2.1.4
with:
app-id: ${{ vars.LIBRECODE_WORKFLOW_APP_ID }}
private-key: ${{ secrets.LIBRECODE_WORKFLOW_APP_PRIVATE_KEY }}
owner: LibreCodeCoop
repositories: .github
permission-contents: write
permission-pull-requests: write
permission-workflows: write
- name: Checkout workflow source
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Checkout organization catalog
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: LibreCodeCoop/.github
token: ${{ steps.app-token.outputs.token }}
persist-credentials: false
path: catalog
- name: Synchronize workflow catalog
run: >-
python3 scripts/sync_catalog.py sync
workflow-templates
catalog/workflow-templates
--manifest workflow-catalog.json
--report catalog-sync-report.json
- name: Create catalog update pull request
uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1
with:
token: ${{ steps.app-token.outputs.token }}
path: catalog
commit-message: 'chore: sync LibreCode workflow catalog'
committer: GitHub <noreply@github.com>
author: github-workflows bot <noreply@github.com>
signoff: true
branch: automated/sync-workflow-catalog
delete-branch: true
title: 'chore: sync workflow catalog'
body: |
Automated synchronization from `LibreCodeCoop/github-workflows`.
The files in `workflow-templates/` are generated and validated in the source repository. Review this pull request before publishing the updated organization catalog.
add-paths: |
workflow-templates/**