Skip to content
terminal

GitHub Action

Define tag and branch based on ref variable action

0.0.4 Latest version

Define tag and branch based on ref variable action

terminal

Define tag and branch based on ref variable action

This will help to get a branch and tag name out of the github.ref can be used

Installation

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

              

- name: Define tag and branch based on ref variable action

uses: elseu/sdu-define-tag-branch-action@0.0.4

Learn more about this action in elseu/sdu-define-tag-branch-action

Choose a version

Define tag and branch based on ref variable action

This will help to get a branch and tag name out of the ${{ github.ref }}

Usage

Directory structure

You need to have in the root of your project having a directory called deploy within this directory there should be a values.yaml file that will be used for the helm chart.

Action

jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - uses: elseu/sdu-define-tag-branch-action@v1
        id: branch_tag

Outputs

Prop description
branch* The branch name if it is a tag the branch name will be empty
tag* If it is a tag it will return here a tag other wise it is the branch name
type* Defines what type it is branch or tag (branch / tag)
branch_not_formatted * Branch name not formatted