Replace string in file, works with ubuntu, windows, macos
APACHE-2.0 License
Replace string in file, works with Ubuntu, Windows, Macos.
The workflow, usually declared in .github/workflows/replace-string-in-file.yml
, looks like:
name: Replace string in file
on:
push:
branches:
- master
- main
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Replace string in file
uses: MathieuSoysal/[email protected]
with:
file: tests/test-file.txt
old-string: WHAT
new-string: World
name: Replace string in file
on:
push:
branches:
- master
- main
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Replace string in file
uses: MathieuSoysal/[email protected]
with:
file: tests/test-file.txt
old-string: 'W.*T$'
new-string: World
-OR-
act
command to test the workflow locallyThe Dockerfile and associated scripts and documentation in this project are released under the Apache 2.0 License.