Repository navigation
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
The documentation publishing workflow cannot currently copy documentation for a release.
The workflow listens for
release: created, then requires:For release-triggered workflows, GitHub sets
github.refto the release tag (refs/tags/<tag_name>), not the release's target branch. As a result, the copy step can never satisfy the existing condition.This is visible with the repository's
1.6release:github.ref:refs/tags/1.6target_commitish:mainfalseThe workflow was added before the
1.6release, but its Actions history contains no runs. Listening forpublishedalso ties the workflow to the point at which a release is actually made public, including releases that were prepared as drafts.The workflow additionally uses
actions/checkout@v2, which Actionlint reports as too old for current GitHub Actions runners. The repository's main test workflow already usesactions/checkout@v5.GitHub documents release refs here:
https://docs.github.com/en/actions/reference/workflows-and-actions/events-that-trigger-workflows#release
Solution
published.github.event.release.target_commitish == 'main'instead of comparing the release tag ref to a branch ref.actions/checkoutfromv2tov5, matching the repository's test workflow.Behavior change
A published release targeting
mainwill now run the documentation copy step.Releases targeting another branch will continue to skip the copy step.
This change only affects the documentation publishing workflow. It does not modify contracts, dependencies, tests, or runtime behavior.
Tests
actionlint v1.7.7 .github/workflows/docs.ymlgit diff --check1.6release metadata:1.6refs/tags/1.6mainfalsetrue