Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
repeat

GitHub Action

RST Substitution

v1.4.0

RST Substitution

repeat

RST Substitution

Github action to replace substitutions in rst file

Installation

Copy and paste the following snippet into your .yml file.

              

- name: RST Substitution

uses: junghoon-vans/varst-action@v1.4.0

Learn more about this action in junghoon-vans/varst-action

Choose a version

varst-action

Github action to replace substitutions in rst file using varST.

Example workflow

Refer example workflow if you want to replace substitutions in README.rst and push it to repository.

steps:
  - uses: actions/checkout@v3
  - name: Replace substitution
  - uses: junghoon-vans/varst-action@v1.4.0
    with:
      substitutions: 'name=value'
  - uses: stefanzweifel/git-auto-commit-action@v4

Full example is here.

Inputs

input-file

Optional The file path to read contents.

Default: ./README.rst

output-file

Optional The file path to write contents.

Default: input-file

substitutions

Required A key-value of substitutions.

Note The value must be enclosed in single quotes.

If multiple values need to be defined, use folded block scalar style.

substitutions: >-
  'name1=value1'
  'name2=value2'
  ...

version

Optional The version of varST to use.

If not specified, the latest version will be used.

License

MIT License