Skip to content

Commit 958c225

Browse files
author
LE SAULNIER Kevin
committed
fix: job
Signed-off-by: LE SAULNIER Kevin <[email protected]>
1 parent 7f4a6a5 commit 958c225

File tree

1 file changed

+9
-17
lines changed

1 file changed

+9
-17
lines changed

.github/workflows/dispatch-release.yml

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@ on:
44
workflow_dispatch:
55
inputs:
66
release-version:
7-
description: Release version (X.X)
7+
description: Release version (vX.X)
8+
required: true
9+
type: string
10+
branch_name:
11+
description: Branch to release (prepare-release-X.X)
812
required: true
913
type: string
1014

@@ -69,24 +73,12 @@ jobs:
6973
cd $folder
7074
7175
version=${{github.event.inputs.release-version}}
72-
branch_name="prepare-release-$version"
73-
# Check if *branch_name* already exists
74-
if ! git ls-remote --exit-code origin "refs/heads/$branch_name"; then
75-
echo "❌ Warning for $folder: Branch $branch_name does not exist"
76-
exit 1
77-
fi
78-
git checkout "$branch_name"
79-
80-
tag_name="v$version"
81-
# Créer le tag
82-
git tag "$tag_name"
83-
84-
# Pousser le tag
85-
git push origin "$tag_name"
76+
branch_name=${{github.event.inputs.branch_name}}
8677
87-
gh api repos/gridsuite/$folder/actions/workflows/release.yml/dispatches \
78+
gh workflow run release.yml \
8879
-f ref=main \
89-
-f inputs.releaseVersion="v${{ github.event.inputs.release-version }}"
80+
-f releaseVersion="$version"
81+
-f gitReference="$branch_name"
9082
9183
cd -
9284
done <<< "${{ steps.load_repos.outputs.list }}"

0 commit comments

Comments
 (0)