Ajout de l'action determineBumpType
This commit is contained in:
parent
77fbd68ff1
commit
05c5db3454
2 changed files with 37 additions and 0 deletions
10
determineBumpType/README.md
Normal file
10
determineBumpType/README.md
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
# Action "determineBumpType"
|
||||||
|
|
||||||
|
## Description
|
||||||
|
Une action permettant de trouver le type de bump à effectuer (Major, Minor, Patch).
|
||||||
|
|
||||||
|
L'action cherche à trouver les chaines suivante dans le message de commit : [MAJOR] ou [MINOR]. Si aucune de ces chaines n'est trouvé, alors le type de bump est "PATCH".
|
||||||
|
|
||||||
|
## Paramètre obligatoire
|
||||||
|
|
||||||
|
- COMMIT_MESSAGE : Ce paramètre doit contenir le message du commit à parser.
|
||||||
27
determineBumpType/action.yaml
Normal file
27
determineBumpType/action.yaml
Normal file
|
|
@ -0,0 +1,27 @@
|
||||||
|
name: 'Determine bump type from commit message'
|
||||||
|
author: 'HR'
|
||||||
|
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"
|
||||||
Loading…
Add table
Add a link
Reference in a new issue