1
1
mirror of https://github.com/nektos/act.git synced 2024-10-05 16:37:43 +03:00
1 Act v2 spec proposal
Ryan edited this page 2022-03-17 13:05:23 +01:00

CLI

act:

  • config file
    • actrc / SetArgs() - there is no need to remove it, can be incorporated into v2
    • YAML - popular and first-class support in Go, DRY(!), same syntax as GitHub Actions workflows/actions but sensitive about spaces and spec is huge!
  • flags
    • --machine-readable (or already existing --json?) - provide flag to output in a format that other software can consume, rationale: others building upon act want to parse stuff but also it can be used to provide advanced completions, e.g.: act -W<tab> .github/workflows/test.yml
    • --container-daemon-* or --container-engine-* - flags to control Docker Engine API-compatible daemons
    • normalize flags
      • --dryrun -> --dry-run
      • --event-path -> --event-file-path
      • --userns -> --container-{daemon,egnine}-userns
      • --defaultbranch -> --default-branch
      • --privileged -> --container-{daemon,egnine}-privileged
      • flags disabling a feature or functionality should be in format of --no-* and make it clear when making new flags, a.k.a follow the unwritten standard of cli opt (examples: https://no-color.org/, grep, file, etc.)
          • --include-*, --exclude-*, etc. where possible
    • --event-type - specify event type that triggers workflows (push, pull_request, workflow_dispatch, etc.)
  • subcommands
    • run - execute workflow
    • agent - run as GitHub Actions runner agent
    • config - generalised interface for configuring act
    • completions - generate completions for shells, helpful for users and package maintainers
    • suggestions?
  • Would we like to replace logrus?