Skip to content

Provide a reusable action for pinned release-tool PHAR execution #87

Description

@vitormattos

Parent: #70
Depends on: #82
Blocks: #71, #76

Goal

Provide one reusable GitHub Action adapter for downloading, verifying and invoking an exact released LibreCodeCoop/release-tool PHAR.

No later workflow should implement its own PHAR download/checksum logic.

Inputs

At minimum:

  • exact release-tool version;
  • expected artifact/checksum source defined by the release-tool release contract;
  • optional command/arguments where appropriate.

Do not accept latest, floating branches or unverified arbitrary URLs.

Behavior

The action:

  1. resolves the exact release-tool release artifact;
  2. downloads release-tool.phar and its SHA-256;
  3. verifies the checksum before execution;
  4. exposes the verified PHAR path;
  5. reports the exact tool version in the step summary/log;
  6. optionally invokes a requested read-only command or leaves execution to the caller, whichever produces the cleaner reusable contract.

Keep the Action thin: no release policy belongs here.

Security

  • pin all third-party Actions by immutable SHA;
  • use least-privilege permissions;
  • do not echo tokens;
  • fail closed on checksum mismatch;
  • do not execute an unverified artifact;
  • actionlint and zizmor must pass.

Output artifact

This issue produces the stable reusable action contract consumed by #71 and later orchestration.

Expected conceptual usage:

- uses: LibreCodeCoop/github-workflows/actions/setup-release-tool@<pinned-sha>
  with:
    version: v0.x.y

The exact public action name/path may change during implementation, but there must be exactly one supported PHAR setup/verification path.

Tests

Cover:

  • valid exact version/checksum;
  • checksum mismatch;
  • missing artifact;
  • unsupported/floating version input;
  • PHAR --version after setup.

Acceptance criteria

Definition of done

  • one reusable setup action exists in github-workflows;
  • it accepts only exact supported release-tool versions and verifies SHA-256 before execution;
  • valid, checksum-mismatch, missing-artifact and floating-version cases are tested;
  • actionlint/zizmor and pinned-action checks pass;
  • Plan and validate a selected release with the reusable engine #71 and later workflows use this action instead of custom PHAR download logic.

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions