Skip to content

Latest commit

 

History

History
55 lines (47 loc) · 2.15 KB

publish-api-comparison.md

File metadata and controls

55 lines (47 loc) · 2.15 KB

publish-api-comparison.yml

This workflow will use the output from the check-api-for-breaking-changes.yml workflow to create a comment on the Pull Request that introduces the changes with a detailed breakdown of the changes. The reason this is a separate workflow that is triggered by the workflow_run event is to allow Pull Requests from forks to still be commented on when there are breaking API changes. Due to the reduced permissions of workflows that are run against Pull Requests from forks, this workflow must be a separate workflow so that it has the elevated permissions necessary to create a comment on the Pull Request.

The workflow calling this reusable workflow must be set to trigger on a completed workflow_run event of the workflow that checks for API breaking changes, usually a Workflow named Check Public API for Breaking Changes, see the example below for the correct yaml syntax.

Important

When calling this reusable workflow, the permissions must be set as follows:

permissions:
  checks: write
  pull-requests: write

Note

This workflow uses the following GitHub Actions:

See the Workflow file for the currently used versions of each GitHub Action.

Tip

See the Workflow file for implementation details.

Example

name: Publish API Breaking Change Check Results
on:
  workflow_run:
    workflows: [Check Public API for Breaking Changes]
    types: [completed]
jobs:
  publish-api-comparison:
    uses: tektronix/python-package-ci-cd/.github/workflows/[email protected]
    permissions:
      checks: write
      pull-requests: write