79222162

Date: 2024-11-25 08:18:28
Score: 0.5
Natty:
Report link

I ended up having only "push" event

on:
  push:
    branches:
      - '**'

And whenever I need to know if it is a branch creation within my pipeline I use github.event.created from the context.

For example here is a custom title for each scenario:

run-name: >
  ${{ 
  startsWith(github.ref_name, 'release/') && github.event.created && 'Create Release' ||
  startsWith(github.ref_name, 'release/') && 'Hotfix' ||
  'Push' 
  }}

First one is for release, second for Hotfix and third for push to any other branch.

Reasons:
  • Blacklisted phrase (0.5): I need
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: Itzhak Eretz Kdosha