Repository navigation
Conversation
The `$/` syntax introduced in DRIVERS-3596 is rejected by the GitHub
Actions runner for composite actions:
Expected format {org}/{repo}[/path]@ref. Actual '$/git-sign'
This breaks every consumer of bump-version and tag-version, for example
the mongo-php-driver release workflow (PHPC-2785).
Use pinned mongodb-labs/drivers-github-tools/...@V3 references in
composite actions again, and relative paths in this repo's own workflows.
zizmor requires $/ instead of ./ for local action references. The $/ syntax is only reverted in composite actions, where the runner rejects it.
bump-version, tag-version and full-report no longer reference other actions with a floating @V3 tag. They run the scripts of git-sign, sbom, authorized-pub, code-scanning-export and compliance-report directly, resolved from github.action_path, so they always use the same commit as the calling action.
tag-version, gpg-sign, upload-s3-assets, full-report, open-or-update-pr, node/get_version_info, setup and secure-checkout are no longer referenced with a floating @V3 tag. Composite actions run the scripts of their siblings through github.action_path, and inline the third-party steps of setup and secure-checkout.
Stop writing GH_TOKEN to GITHUB_ENV in the inlined secure-checkout steps of ruby/*. The token is read from the app-token step outputs instead.
| - name: Check out the repository | ||
| uses: actions/checkout@v7 | ||
| with: | ||
| token: ${{ steps.app-token.outputs.token }} | ||
| fetch-depth: 1 | ||
| submodules: false | ||
| env: | ||
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true" |
|
This PR is closed because it was based on a wrong assumption: the It was opened after the mongo-php-driver release run https://github.com/mongodb/mongo-php-driver/actions/runs/38699312319 (DRIVERS-3707) showed these messages: The description above says that every consumer of The annotations come from the runner version of that run, 2.337.0. They are fixed by actions/runner#4669 ("Accept $/ self-repository references in action manifests"), which says it "prevents valid nested self-repository actions from being reported as malformed". It ships in runner v2.338.0. The runs below use 2.338.0 and have no such annotation, while still resolving
So the |
DRIVERS-3707
The
$/syntax adopted in #112 (DRIVERS-3596) is rejected by the GitHub Actions runner when it loads a composite action from another repository:Every consumer of
bump-versionandtag-versionfails, including v3.0.7 and v3.1.1. For example, the mongo-php-driver release workflow fails in the "Prepare release" job (PHPC-2785): https://github.com/mongodb/mongo-php-driver/actions/runs/38699312319/job/116303358527Going back to
mongodb-labs/drivers-github-tools/...@v3would work, but@v3is a floating tag. A consumer pinned to a SHA would still run the sub-actions from whateverv3points to, and every release would need an update. This PR avoids internaluses:references entirely.git-sign,sbom,authorized-pub,bump-version,tag-version,gpg-sign,upload-s3-assets,full-reportandnode/get_version_infonow lives in a script next to theaction.yml. The action runs it throughgithub.action_path.bash "${{ github.action_path }}/../git-sign/git-sign.sh". The script is resolved from the same commit as the calling action, so a SHA pin freezes the whole tree and nothing needs updating on a release.open-or-update-prandcompliance-reportalready had a script, which is now called directly.setupandsecure-checkoutwrap third-party actions (aws-actions/*,actions/create-github-app-token,actions/checkout), so they cannot become scripts. Their steps are inlined in the actions that used them (ruby/*andnode/sign_node_package). This duplicates the steps and their SHA pins; it is the part of this PR that needs the closest review.action.ymlfiles stay in place with the same inputs, so consumers that use them directly (see the README andnode/release_template.yml) are not affected.ci.ymlandrelease.ymlkeep$/, because zizmor requires it for local references in this repository's own workflows.node/generate_release.mjsandnode/release_template.ymlare removed, as they only explained the$/exception.README.md,CONTRIBUTING.mdand script comments no longer describe$/as the way to reference internal actions.Checked:
shellcheck --severity=warningpasses on all scripts, and everyaction.ymlis valid YAML.tag-version,upload-s3-assets,gpg-sign,bump-versionandfull-reportwere run locally with stubbeddocker,gh,aws,gitandnode. They build the expected commands.Not checked:
ruby/*,node/sign_node_package,golang/*andpython/*were only validated as YAML.A new patch release is needed after merging so consumers can pick up the fix.