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
34 changes: 34 additions & 0 deletions .github/workflows/abi-report.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Publishes the result of the "abi" workflow (abi.yaml) on the pull request:
# one sticky comment with the per-library ABI verdicts and the
# "ABI compatible" / "ABI break" label.
#
# This is a separate workflow because abi.yaml builds and diffs the pull
# request's own code. For pull requests from forks GitHub therefore runs it
# with a read-only token, whatever permissions it asks for, and it cannot
# write to the PR. workflow_run workflows instead run the workflow file from
# the default branch of this repository with a normal token; this one never
# checks out or executes anything from the pull request, it only downloads the
# report artifacts the abi run uploaded and posts what they say.
Comment on lines +5 to +11

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is exactly what this PR trying to solve.

#
# The pass/fail check on the pull request still comes from abi.yaml; this
# workflow only adds the comment and the label. It only starts firing once it
# exists on the default branch, and a first-time contributor's abi run still
# needs a maintainer's approval before anything is published.
#
# See https://github.com/fujitatomoya/ros2-abi-action for details.
name: abi-report

on:
workflow_run:
# Must match the `name:` of abi.yaml.
workflows: [abi]
types: [completed]

jobs:
report:
permissions:
contents: read
pull-requests: write # sticky comment + label
issues: write # label
actions: read # download the abi run's report artifacts
uses: fujitatomoya/ros2-abi-action/.github/workflows/report.yml@main
17 changes: 14 additions & 3 deletions .github/workflows/abi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,15 @@
# fujitatomoya/libabigail-action (abidiff), one job per library,
# 5. applies REP-0009 policy automatically: released distros (humble/jazzy/kilted/lyrical)
# fail on an incompatible ABI break, rolling is advisory only,
# 6. surfaces per-library verdicts as sticky PR comments, labels, and a pass/fail check.
# 6. surfaces the verdict as a pass/fail check and uploads one report bundle
# (abidiff report + verdict.json) per library.
#
# The sticky PR comment and the "ABI compatible" / "ABI break" labels are NOT
# posted from here (publish: workflow-run). Most rclcpp pull requests come from
# forks, and on pull_request events from a fork GitHub gives this workflow a
# read-only token regardless of the permissions requested below, so any write
# to the PR would fail. abi-report.yaml runs on workflow_run once this workflow
# completes and publishes the comment and labels with a token that may write.
#
# Paired changes in other repositories (e.g. an rcl PR this PR depends on) are
# declared by the PR author in the PR description and applied to the PR side
Expand All @@ -41,10 +49,10 @@ on:

jobs:
abi:
# Nothing is written to the pull request from this workflow; the report
# workflow holds the write permissions.
permissions:
contents: read
pull-requests: write
issues: write
uses: fujitatomoya/ros2-abi-action/.github/workflows/check.yml@main
with:
# Colcon package names to build (whitespace-separated); no single package
Expand All @@ -63,3 +71,6 @@ jobs:
distro: auto
# auto -> REP-0009: strict on released distros, advisory on rolling.
policy: auto
# Leave the PR comment and labels to abi-report.yaml (workflow_run), so
# pull requests from forks get them too.
publish: workflow-run
Loading