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

GitHub Action

Regex Replace

v1.0

Regex Replace

type

Regex Replace

Allows you to perform a regex replace within the action script

Installation

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

              

- name: Regex Replace

uses: ashley-taylor/[email protected]

Learn more about this action in ashley-taylor/regex-property-action

Choose a version

regex-property-action

Example

    - name: Name of branch
      id: branch
      uses: ashley-taylor/[email protected]
      with:
        value: ${{ github.ref }}
        regex: ".*/"
        replacement: ""
    - name: branch
      run: branch "${{ steps.branch.outputs.value }}"