ForgejoActions/determineBumpType/action.yaml

26 lines
No EOL
815 B
YAML

name: 'Determine bump type from commit message'
description: |
Une action permettant de trouver le type de bump à effectuer (Major, Minor, Patch).
L'action cherche à trouver les chaines suivante : [MAJOR] ou [MINOR] et si ne trouve rien, choisi patch.
inputs:
COMMIT_MESSAGE:
description: "Message de commit à parser"
required: true
runs:
using: 'composite'
steps:
- name: determine bump type
env:
COMMIT_MESSAGE: ${{ inputs.COMMIT_MESSAGE }}
run: |
if [[ $COMMIT_MESSAGE == *"[MAJOR]"* ]]; then
BUMP=MAJOR
elif [[ $COMMIT_MESSAGE == *"[MINOR]"* ]]; then
BUMP=MINOR
else
BUMP=PATCH
fi
echo "bumpType=$BUMP" >> $FORGEJO_OUTPUT
echo "Bump détecté dans le commit : $BUMP"