Skip to content

Docs: Mark the action as deprecated #228

Done

Description

Summary

lfreleng-actions/build-metadata-action reports everything this action reports, and the actions that called this one have moved to it. Add a deprecation notice to README.md that says so and shows how to move. The repository will be archived once the notice has merged.

Line numbers are from d1ad8cc on main.

Background

  • The actions that called this one have moved or gone. python-project-metadata-action is archived. pypi-publish-action reads the name from build-metadata-action since v0.2.5, and python-audit-action since v0.6.5.
  • A code search on 2026-11-26 finds no other workflow or action in this organisation that calls it.
  • The outputs were compared on 2026-11-26, on 21 small projects, against build-metadata-action at ef8daaa on main, which holds the fixes that v0.13.5 will release. The mapping and the differences below are what that comparison found.
  • One more difference the comparison found is a defect in build-metadata-action: when a pyproject.toml names no project but holds a [tool.setuptools], [tool.hatch], [tool.pdm] or [tool.poetry] table, it does not read on to setup.cfg and setup.py, as this action does. Fix: Correct Python fall-through and provider build-metadata-action#231 fixes that before v0.13.5 is tagged, so the notice does not mention it.

Changes

All in README.md.

  1. A notice directly under the title (line 6), as a GitHub alert block (> [!WARNING]). It should say that:
    • the action is deprecated and gets no further development;
    • this repository will be archived, and references to its existing tags and commits keep working after that;
    • lfreleng-actions/build-metadata-action replaces it, with a link to the section below.
  2. A section, ## Migrating to build-metadata-action, holding:
  3. Two corrections, so that the README the archive keeps is accurate:
    • Lines 88–89 say the action also exports its outputs as environment variables. It does not: action.yaml writes step outputs alone (lines 1494–1497), and has not written to GITHUB_ENV since b10f005 (2026-06-24). Remove the sentence.
    • The ## Inputs table (line 73) names the input PATH_PREFIX. It is path_prefix (action.yaml, line 11).

Replacement step

- name: Fetch Python project/package name
  id: metadata
  uses: lfreleng-actions/build-metadata-action@0000000000000000000000000000000000000000  # REPLACE: vX.Y.Z
  with:
    project_type: 'python'
    use_version_extract: 'false'
    include_environment: 'false'
    artifact_upload: 'false'
    output_format: ''
    python_offline_mode: 'true'
  • Pin by commit SHA with the placeholder, the way the python-workflows examples do, not @main.
  • project_type keeps a package.json or go.mod beside the Python files from naming another project.
  • The other five inputs keep the step as quiet as this action is: no version lookup, no probe of the runner, no uploaded artefact, no job summary and no query for current Python releases. This is the call pypi-publish-action and python-audit-action make.
  • The step sets up Go and builds the action's binary on each run. Say so in a sentence, so that a caller expects it.
  • Add path_prefix where the project is not at the repository root.

Output mapping

This action build-metadata-action
python_project_name project_name
python_package_name python_package_name
python_project_file python_metadata_source
source python_metadata_source

Differences

  1. The package name. This action replaces the dashes in the project name with underscores. python_package_name of build-metadata-action is the name as the project declares it: my-cool-pkg stays my-cool-pkg.
  2. A project with no name. This action fails. build-metadata-action succeeds and leaves project_name empty, so a caller that needs a name has to check for one.
  3. Characters in the name. This action accepts a name only when it holds letters, digits, ., _ and - alone, and otherwise tries the next file or fails. build-metadata-action reports the name as the project declares it: name = "bad name!" gives bad name!. A caller that relied on that check has to make it itself, and should pass the output to a script through env:, never by expanding it inside a run: block.

Out of scope

  • action.yaml, the workflows and the tests. The action itself does not change: its callers have gone, so a warning at run time would reach nobody.
  • A release. The change is to the README alone.
  • The other Python actions. Whether they are deprecated is for their own repositories to say.

Acceptance criteria

  • The README opens, under its title, with the deprecation notice
  • The migration section shows the replacement step, maps all four outputs, states the three differences and names v0.13.5
  • The sentence on environment variables is gone, and the ## Inputs table names path_prefix
  • Only README.md changes, in one commit whose subject is the pull request's title: Docs: Mark the action as deprecated
  • prek run --files README.md passes

Notes for an automated author

  • markdownlint, write-good and codespell all run on the README. Its tables sit between MD013 guards; the new table needs the same.
  • The mapping and the differences above are facts to carry over, not wording to copy. Keep the README's own voice.
  • The README describes how the action reads each file (lines 10–54). Leave that description as it is: the tags stay usable, and it documents them.

Activity

  1. added
    documentation
    on Nov 26, 2026
  2. lf-releng-code-monkey-bot commented on Nov 26, 2026

    @lf-releng-code-monkey-bot
    Contributor

    🐒 An AI agent has proposed a change for this issue: pull request #229 (head 4450893). GitHub did not confirm whether the pull request can merge with main, so its CI may not have run. The Copilot review of it is clean. An antagonistic review was requested from the review bot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentation

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions