{
  "slug": "flux-cli-action-can-read-its-version-from-a-file-d309f356985e",
  "title": "Flux CLI action can read its version from a file",
  "tools": [
    "flux"
  ],
  "tags": [
    "agent"
  ],
  "introduced_at": "2026-10-26T15:37:42.000Z",
  "announced_at": "2026-10-26T15:37:42.000Z",
  "effective_at": null,
  "date_basis": "source-publication",
  "status": "unknown",
  "how": {
    "incantation": "When pinning Flux CLI in a repository workflow from a version file, set the GitHub Action’s `version-file` input to that file; the action reads the `flux` entry from `.tool-versions` or a single plain-text version. The input is ignored when `version` is set.",
    "examples": [
      "steps:\n  - name: Setup Flux CLI\n    uses: fluxcd/flux2/action@main\n    with:\n      version-file: .flux-version\n  - name: Run Flux CLI\n    run: flux version --client"
    ],
    "gotchas": [
      "Version: v2.10.0",
      "version-file: Path to a `.tool-versions` file (reads the `flux` entry) or a plain-text file containing a single version, such as `2.0.0`; ignored when `version` is set.",
      "version: Flux version to install; when set, `version-file` is ignored. Defaults to latest stable release.",
      "The input accepts an asdf-format `.tool-versions` file (reads the `flux` entry) or a plain text file containing a single version such as `2.0.0`.",
      "The input is ignored when `version` is set."
    ]
  },
  "why_it_matters": "Pin the Flux CLI version for a repository workflow from a version file.",
  "before": "Hardcode the Flux version in the workflow.",
  "sources": [
    "https://github.com/fluxcd/flux2/releases/tag/v2.10.0",
    "https://github.com/fluxcd/flux2/pull/5975",
    "https://github.com/fluxcd/flux2/blob/v2.10.0/action/README.md",
    "https://github.com/fluxcd/flux2/blob/v2.10.0/action/action.yml"
  ],
  "rank": 0.93031,
  "review_state": "approved",
  "provenance": {
    "run_id": "daily-20261027-04",
    "verdict_id": "daily-20261027-04:daily-20261027-04-f652955d9ebdc645-11:gate",
    "evidence_hash": "cf095957e7bb3f8584283e47c501be6b1c0150bbcf9067bd9531f09b15fb67ee"
  }
}
