Skip to content

Substring branch name after a separator

Actions
Substring the branch name (that trigger the action) after the first occurrence of a given separator
v0.2.3
Latest
Star (0)

Substring branch name after a separator

GitHub Actions that substring the branch name after the first occurrence of a given separator.

Input

This action requires the separator attribute of type string. Examples: release- or rc/.

Output

This action output the value in value variable.

Example

name: Example
jobs:
  generate:
    steps:
      - uses: actions/checkout@v2
      - name: Substring branch name
        id: substring
        uses: ricardorames/[email protected]
        with:
            separator: 'release-'
      - name: Build and push Docker images
        uses: docker/[email protected]
        with:
          username: ${{secrets.DOCKER_REGISTRY_USERNAME}}
          password: ${{secrets.DOCKER_REGISTRY_PASSWORD}}
          registry: your.registry.io
          repository: your-repository
          tags: ${{steps.substring.outputs.value}}
          tag_with_ref: false
          tag_with_sha: false

Substring branch name after a separator is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

Substring the branch name (that trigger the action) after the first occurrence of a given separator
v0.2.3
Latest

Substring branch name after a separator is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.