Skip to content
name: Release branch name test
on:
release:
types:
- created
jobs:
conditional-exit:
name: Conditionally print stuff
runs-on: ubuntu-latest
steps:
- id: branch-names
uses: tj-actions/branch-names@v8
- name: Check release branch
run: |
echo conditionally
echo ${{steps.branch-names.outputs.base_ref_branch}}
echo ${{steps.branch-names.outputs.current_branch}}
echo ${{steps.branch-names.outputs.default_branch}}
echo ${{steps.branch-names.outputs.head_ref_branch}}
echo ${{steps.branch-names.outputs.ref_branch}}
if ${{steps.branch-names.outputs.current_branch != 'main'}} then exit 0
- name: Some stuff
run: |
echo some stuff
- name: Some other stuff
run: |
echo some other stuff