Github Action

kind: githubaction

Description

The Github Action crawler looks recursively for all Github Action workflows. Then for each of them, it tries to automate its update.

It currently support the following sources:

Manifest

Parameters

NameTypeDescriptionRequired
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" }}'
    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 GitHub Action workflow file name

default:

  • “.github/workflows/*.yaml”,
  • “.github/workflows/*.yml”,
  • “.gitea/workflows/*.yaml”,
  • “.gitea/workflows/*.yml”,
  • “.forgejo/workflows/*.yaml”,
  • “.forgejo/workflows/*.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: patch - patch only update patch version minor - minor only update minor version major - major only update major versions 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.
    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.
    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

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:
    githubaction:
      spec:
        digest: true
        rootdir: ".github"
Top