Skip to content
This repository was archived by the owner on Nov 16, 2023. It is now read-only.
Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Latest commit

 

History

8 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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}}

About

Find and replace placeholders across files in the repository

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages