Skip to content

Replace Placeholders

Actions
Convert the list of releases to a changelog
v1
Latest
By LSVH
Star (0)

Replace Placeholders Action

Find and replace placeholders across files in the repository

Inputs

include

The file(s) where in the placeholders should be replaced. Default: All files (.*).

  • A file name can also be a glob pattern.
  • Multiple file names can be listed, by adding one per line:
    include: |
      file1.txt
      file2.txt
    

exclude

The opposite of include, file(s) which should be ignored when replacing.

placeholders

Required: A key-value list of placeholders.

Use key-value pairs separated by =, the key can be a string or regex:

placeholders: |
  MY_PLACEHOLDER=foo
  %%HELLO%%=World
  /^.*\/\/.*/g=

Outputs

changed-files

A list of files what where changed during the replace operation.

Example usage

- uses: LSVH/gha-replace-placeholders@v1
  with:
    placeholders: |
      %%REPOSITORY_OWNER%%=${{github.repository_owner}}
      [REPOSITORY]=${{github.repository}}

Replace Placeholders is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

Convert the list of releases to a changelog
v1
Latest
By LSVH

Replace Placeholders is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.