Description

The github/action crawler looks recursively for workflow files and Composite Actions, then tries to update every action reference found in them.

It scans two kinds of file:

  • Workflows - files matching .yaml or .yml located directly inside a workflows directory whose parent is .github, .gitea, or .forgejo.

  • Composite Actions - files named action.yaml or action.yml, in any directory.

Despite its name, the crawler is not GitHub-only: .gitea/workflows and .forgejo/workflows are scanned as well, and the provider is detected from each action reference.

This crawler is enabled by default, so it can be used either automatically by running updatecli diff from a directory containing the files to update, or by providing a manifest. The automatic discovery behavior can be tuned by providing a YAML manifest with a github/action crawler in top-level directive autodiscovery as explained in the "Autodiscovery" page.

Note
The crawler key is github/action. The alias gitea/action maps to the same implementation, but it is not part of the default crawlers, so it only runs when explicitly declared.

Generated manifests

Action references are updated in place with a yaml target. The source depends on the provider and on the shape of the reference:

ReferenceSources used

owner/repo@v4 on GitHub

githubrelease, gittag, gitbranch

owner/repo@v3 on Gitea or Forgejo

gitea/release, gittag, gitbranch

docker://image:tag

dockerimage, dockerdigest

./local-action

Skipped - local actions have no upstream to track.

Digest pinning

digest defaults to true, so generated manifests pin references to an immutable digest and keep the human-readable version as a trailing comment:

- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

Set digest: false to write the tag or branch directly instead.

Important
Digest pinning is only implemented for GitHub Actions and Docker image references. Gitea and Forgejo actions are always updated to a tag or branch.

Authentication

Discovery queries the provider’s API, so unauthenticated runs are rate limited and private repositories are invisible.

Tokens are resolved per hostname, from credentials, from a GitHub App configuration, or from the environment:

  • GitHub: UPDATECLI_GITHUB_TOKEN, then GITHUB_TOKEN

  • Gitea and Forgejo: UPDATECLI_GITEA_TOKEN, then GITEA_TOKEN

gitea.com, codeberg.org, and code.forgejo.org are recognised as Gitea automatically. Any other unknown hostname falls back to GitHub.

Use credentialsdocker to authenticate against a private registry when resolving docker:// references.

Limitations

  • files matches the file name only, not a path. Patterns such as .github/workflows/.yaml match nothing; use .yaml or ci.yaml. The directory is constrained separately, to .github, .gitea, or .forgejo workflow directories.

  • actions filters Composite Actions by the name of the directory containing action.yaml, not by the file path.

  • Workflow files that are not directly inside a workflows directory are ignored.

Manifest

Parameters

NameTypeDescriptionRequired
actionsarray

actions allows to specify the accepted Composite Action names

A Composite Action is identified by an “action.yaml” or “action.yml” file, and the pattern is matched against the name of the directory containing it.

default:

  - "*",
credentialsobject

Credentials allows to specify the credentials to use to authenticate to the git provider The ID of the credential must be the domain of the git provider to configure

default: empty

examples:

  autodiscovery:
    crawlers:
      github/action:
        credentials:
          "code.forgejo.com":
            kind: gitea
            token: xxx
          "github.com":
            kind: github
            token: '{{ requiredEnv "GITHUB_TOKEN" }}'
    appobject
        clientidstringClientID represents the GitHub App client ID
        expirationtimestring

Expiration represents the token expiration time in seconds The token is used during the entire execution of updatecli and should be valid for the entire duration of the run The minimum value is 600 seconds (10 minutes)

Default: 3600 (1 hour)

        installationidstringInstallationID represents the GitHub App installation ID It is the same ID that you can find in the GitHub endpoint: https://github.com/settings/installation/
        privatekeystringPrivateKey represents a PEM encoded private key It is recommended to use PrivateKeyPath instead of PrivateKey to avoid putting sensitive information in the configuration file If both PrivateKey and PrivateKeyPath are set, PrivateKey takes precedence
        privatekeypathstringPrivateKeyPath represents the path to a PEM encoded private key If both PrivateKey and PrivateKeyPath are set, PrivateKey takes precedence It is recommended to use an environment variable to set the PrivateKeyPath value e.g. PrivateKeyPath: {{ requiredEnv “GITHUB_APP_PRIVATE_KEY_PATH” }} to avoid putting sensitive information in the configuration file
    kindstring
    tokenstring
credentialsdockerobjectCredentialsDocker provides a map of registry credentials where the key is the registry URL without scheme
    passwordstring

password specifies the container registry password to use for authentication. Not compatible with token

compatible: * source * condition * target

default: by default credentials are fetch from the local environment such as ~/.docker/config.json.

remark: Not compatible with token

    tokenstring

token specifies the container registry token to use for authentication.

compatible: * source * condition * target

default: by default credentials are fetch from the local environment such as ~/.docker/config.json.

remark: Not compatible with username/password

    usernamestring

username specifies the container registry username to use for authentication.

compatible: * source * condition * target

default: by default credentials are fetch from the local environment such as ~/.docker/config.json.

remark: Not compatible with token

digestboolean

Digest provides parameters to specify if the generated manifest should use a digest instead of the branch or tag.

Remark: - The digest is only supported for GitHub Action and docker image tag update. Feel free to open an issue for the Gitea and Forgejo integration.

filesarray

files allows to specify the accepted Action workflow file name

The pattern is matched against the file name only, not against its path, so a pattern such as “.github/workflows/*.yaml” never matches. The directory is constrained separately: a workflow file must sit directly inside a “workflows” directory whose parent is “.github”, “.gitea”, or “.forgejo”.

default:

  - "*.yaml",
  - "*.yml",
ignorearray

ignore allows to specify rule to ignore autodiscovery a specific GitHub action based on a rule

default: empty

    actionsobject

Actions specifies the list of artifacts to check

The key is the artifact name and the value is the artifact version

The artifact name must match the GitHub action name or the Docker image name. In case of a Docker image, it must have the prefix docker://

If the value is empty, then the artifact name is enough to match If the value is a valid Git branch, Git tag, release, a Docker image tag , then the artifact version must match the constraint

    pathstringPath specifies a Flux filepath pattern, the pattern requires to match all of name, not just a subpart of the path.
onlyarray

only allows to specify rule to only autodiscover manifest for a specific GitHub action based on a rule

default: empty

    actionsobject

Actions specifies the list of artifacts to check

The key is the artifact name and the value is the artifact version

The artifact name must match the GitHub action name or the Docker image name. In case of a Docker image, it must have the prefix docker://

If the value is empty, then the artifact name is enough to match If the value is a valid Git branch, Git tag, release, a Docker image tag , then the artifact version must match the constraint

    pathstringPath specifies a Flux filepath pattern, the pattern requires to match all of name, not just a subpart of the path.
rootdirstring

rootDir allows to specify the root directory from where looking for GitHub Action

default: empty

versionfilterobject

versionfilter provides parameters to specify the version pattern used when generating manifest.

kind - semver versionfilter of kind semver uses semantic versioning as version filtering pattern accepts one of: prerelease - Updatecli tries to identify the latest prerelease whatever it means patch - Updatecli only handles patch version update minor - Updatecli handles patch AND minor version update minoronly - Updatecli handles minor version only major - Updatecli handles patch, minor, AND major version update majoronly - Updatecli only handles major version update a version constraint such as >= 1.0.0

kind - regex versionfilter of kind regex uses regular expression as version filtering pattern accepts a valid regular expression

example:

  versionfilter:
    kind: semver
    pattern: minor

and its type like regex, semver, or just latest.

More examples can be found at https://www.updatecli.io/docs/core/versionfilter/

    kindstringspecifies the version kind such as semver, regex, or latest
    patternstringspecifies the version pattern according the version kind for semver, it is a semver constraint for regex, it is a regex pattern for time, it is a date format
    regexstringspecifies the regex pattern, used for regex/semver and regex/time. Output of the first capture group will be used.
    replaceallobjectreplaceAll applies a regex replacement to version strings before filtering. This is useful for transforming versions (e.g., curl-8_15_0 to curl-8.15.0) before regex extraction.
        patternstringPattern specifies the regex pattern to match for replacement
        replacementstringReplacement specifies the replacement string (supports $1, $2, etc. for captured groups)
    strictbooleanstrict enforce strict versioning rule. Only used for semantic versioning at this time
⚠ This table is generated from the Updatecli codebase and may contain inaccurate data. Feel free to report them on github.com/updatecli/updatecli
Note
Each entry of credentials is keyed by the git provider hostname, and accepts kind (github, gitea, or forgejo) along with a token or a GitHub App configuration.

Example

Basic Example

# updatecli.d/default.yaml
name: "githubaction autodiscovery"
scms:
  default:
    kind: git
    spec:
      url: https://github.com/updatecli/updatecli.git
      branch: "main"

autodiscovery:
  scmid: default
  crawlers:
    github/action:
      digest: true
      rootdir: ".github"

Multiple providers

# updatecli.d/github-action-providers.yaml
autodiscovery:
  crawlers:
    github/action:
      # Pin to a tag or branch rather than a digest
      digest: false
      credentials:
        "github.com":
          kind: github
          token: '{{ requiredEnv "GITHUB_TOKEN" }}'
        "codeberg.org":
          kind: forgejo
          token: '{{ requiredEnv "FORGEJO_TOKEN" }}'
      versionfilter:
        kind: semver
        pattern: minor
Important
Crawler settings are declared directly under the crawler key. An extra spec: level is accepted by the parser but silently ignored, leaving every setting at its default.