Skip to content

Commit 7cd9f6b

Browse files
authored
CI: Sync with worflow dispatch (#455)
1 parent 57cbb08 commit 7cd9f6b

File tree

1 file changed

+9
-21
lines changed

1 file changed

+9
-21
lines changed
Lines changed: 9 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
name: Sync release tag from PyAEDT
22

33
on:
4-
repository_dispatch:
5-
types: [release_tag]
4+
workflow_dispatch:
5+
inputs:
6+
tag:
7+
description: "Release tag from PyAEDT to sync"
8+
required: true
69

710
jobs:
811
create-tag:
@@ -15,38 +18,23 @@ jobs:
1518
with:
1619
persist-credentials: false
1720

18-
- name: Validate tag input
19-
run: |
20-
TAG_NAME="${{ github.event.client_payload.tag }}"
21-
if [[ -z "$TAG_NAME" ]]; then
22-
echo "Error: No tag provided in the payload"
23-
exit 1
24-
fi
25-
echo "Tag to create: $TAG_NAME"
26-
2721
- name: Create and push tag
2822
run: |
2923
# Configure git username & email
3024
git config --global user.name "${{ secrets.PYANSYS_CI_BOT_USERNAME }}"
3125
git config --global user.email "${{ secrets.PYANSYS_CI_BOT_EMAIL }}"
3226
33-
TAG_NAME="${{ github.event.client_payload.tag }}"
27+
TAG_NAME="${{ github.event.inputs.tag }}"
3428
35-
if [[ -z "$TAG_NAME" ]]; then
36-
echo "Error: No tag provided in the payload"
37-
exit 1
38-
fi
39-
echo "Tag to create: $TAG_NAME"
40-
4129
if git rev-parse "$TAG_NAME" >/dev/null 2>&1; then
4230
echo "Tag $TAG_NAME already exists, skipping creation"
4331
exit 0
4432
fi
45-
33+
4634
echo "Creating tag: $TAG_NAME"
4735
git tag "$TAG_NAME"
48-
36+
4937
echo "Pushing tag to origin"
5038
git push origin "$TAG_NAME"
51-
39+
5240
echo "Successfully created and pushed tag: $TAG_NAME"

0 commit comments

Comments
 (0)