Giter Club home page Giter Club logo

actions-find-and-replace-string's Introduction

Find and replace strings

This action executes find-and-replace on a given string (hint: use ${{ github.ref }} to get your branch name and apply this on it for use in another action).

Inputs

source

Required The source string to apply this action to

find

Required The text you want to search for within the branch name (eg. ref/heads/)

replace

Required The text you want to replace (eg. head-, ``, root_)

Outputs

value

The new value containing the found-and-replaced string.

Example usage

uses: mad9000/actions-find-and-replace-string@2
with:
    source: ${{ github.ref }} # this translates to ref/heads/main on the main branch, but can be any arbitrary string 
    find: 'ref/heads/'        # we want to remove ref/heads/ from source 
    replace: ''               # and replace it with a blank string (ie. removing it)

This will output main.

Check out .github/workflows/main.yml for more examples

actions-find-and-replace-string's People

Contributors

kishyr avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.