This action inserts input
between the begin-marker
and end-marker
in target
file.
# Insert with text
steps:
- uses: 'kunzese/insert-between-markers@v0'
with:
begin-marker: '<!-- BEGIN_MARKER -->'
end-marker: '<!-- END_MARKER -->'
input: Lorem ipsum dolor sit amet, consetetur sadipscing elitr
# Insert from file
steps:
- uses: 'kunzese/insert-between-markers@v0'
with:
begin-marker: '<!-- BEGIN_MARKER -->'
end-marker: '<!-- END_MARKER -->'
input: ./output.log
input-type: file
This action supports the following inputs:
-
target
- (optional) The name of the target file. Defaults toREADME.md
. -
encoding
- (optional) The encoding of the target file. Defaults toutf8
. -
begin-marker
- (required) The format of the begin marker. -
end-marker
- (required) The format of the end marker. -
input
- (required) The text which will be inserted between the begin and end marker or a file path. Ifinput-type
is set tofile
,input
is expected to be a file from which the content is read. -
input-type
- (optional) Ifinput-type
is set tofile
,input
is expected to be a file from which the content is read. Defaults totext
.
changed
- Determines wheter this action changed the target file (true
) or not (false
).