Skip to content

jg-wright/regex-action

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

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

regex-action

A GitHub action that applies a regular expression to an input and outputs the groups.

Inputs

Name Description Required
regex The regular expression true
ref What to apply the regex to true

Example

jobs:
  decipher:
    name: Decipher
    runs-on: ubuntu-latest
    steps:

      - name: Parser
        id: parser
        uses: johngeorgewright/regex-action@v2.0.0
        with:
          ref: refs/heads/master
          regex: ^refs/tags/(?P<package>[a-zA-Z0-9_-]+)-v(?P<version>\d+.\d+.\d+)$

      - name: Debug
        run: |
          echo 'package = ${{ fromJSON(steps.parser.outputs.groups).package }}'
          echo 'version = ${{ fromJSON(steps.parser.outputs.groups).version }}'

About

Applies a regular expression to an input.

Resources

License

Stars

1 star

Watchers

1 watching

Forks

Packages

 
 
 

Contributors