This action executes find-and-replace all occurences on a given string.
Required The source string to apply this action to
Required The text you want to search for
Required The text you want to replace with
The new value containing the found-and-replaced string
uses: LarsenLP/actions-find-and-replace-string@3
with:
source: ${{ github.ref }} # this translates to ref/heads/main on the main branch, but can be any arbitrary string
find: '/' # we want to find /
replace: '-' # and replace it with -
This will output ref-heads-main
.
Check out .github/workflows/main.yml
for more examples