Skip to content

endaft/action-prepend

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

action-prepend

This GitHub Action helps easily pre-pend values, including other files, into a target file.

Example

This example demonstrates using this action to pre-pend the changelog.md file with calculated output from loopwerk/tag-changelog.

- name: ✍🏼 Create Changelog Update
  id: changelog
  uses: loopwerk/tag-changelog@v1
  with:
    token: ${{ secrets.GITHUB_TOKEN }}
    config_file: .github/tag-changelog-config.js

- name: ✍🏼 Prepend Changelog
  uses: endaft/action-prepend@v0.0.7
  with:
    file_target: CHANGELOG.md
    value_in: ${{ format('{0}\n', steps.changelog.outputs.changelog) }}
    is_file: "false"

Inputs

name required description default
file_target true The path to a file to which data will be pre-pended.
value_in true The value, or file path of a value, to be pre-pended.
is_file true Whether or not to get the in_value is a file path. false

Outputs

None