name: GitHub Signed Commit
description: GitHub Action to create signed commits

branding:
  icon: git-commit
  color: orange

inputs:
  files:
    description: |
      Multi-line string of file paths to be committed, relative to the current workspace.
    required: false
  workspace:
    description: |
      Directory containing files to be committed. Default: GitHub workspace directory (root of repository).
    required: false
    default: ''
  workdir:
    description: |
      Directory where the action should run. Default: GitHub workspace directory (root of repository from where the GH Workflow is triggered).
    required: false
    default: ''
  commit-message:
    description: |
      Commit message for the file changes.
    required: false
  owner:
    description: |
      GitHub repository owner (user or organization), defaults to the repo invoking the action.
    required: false
  repo:
    description: |
      GitHub repository name, defaults to the repo invoking the action.
    required: false
  branch-name:
    description: |
      Branch to commit to. Default: Workflow triggered branch.
    required: false
    default: ''
  branch-push-force:
    description: |
      --force flag when running git push <branch-name>.
    required: false
    default: false
  tag:
    description: |
      Push tag for the new/current commit.
    required: false
    default: ''
  tag-only-if-file-changes:
    description: |
      Push tag for new commit only when file changes present.
    required: false
    default: true

outputs:
  commit-sha:
    description: Full SHA of the signed commit.
  tag:
    description: Tag of the signed commit.

runs:
  using: node20
  main: dist/index.js