Skip to content

Commit 6fc02fd

Browse files
Mohammad Mahdi MalmasiMohammad Mahdi Malmasi
authored andcommitted
trigger added to set new tag ci
1 parent fa612fa commit 6fc02fd

File tree

2 files changed

+19
-3
lines changed

2 files changed

+19
-3
lines changed

.github/workflows/build_and_push_python_codes.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,15 @@ jobs:
4646
4747
- name: Commit changes
4848
run: |
49+
export TAG_NAME=$(basename ${{ github.ref }})
50+
bash -c "if [[ ${{ github.ref }} == 'master' ]]; then export TAG_NAME=${{ github.event.client_payload.tag_name }}; fi"
51+
echo "Tag name: $TAG_NAME"
52+
echo "payload: ${{ github.event.client_payload.tag_name }}"
4953
cd destination-repo
5054
git config user.email "m.mahdi.m79@gmail.com"
5155
git config user.name "Mohammad Mahdi Malmasi"
5256
git add .
53-
git commit -m "Update for tag: $(basename ${{ github.ref }})"
54-
git tag $(basename ${{ github.ref }})
57+
git commit -m "Update for tag: $TAG_NAME"
58+
git tag $TAG_NAME
5559
git push --tags
5660
git push origin master

.github/workflows/set_new_version_tag.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,23 @@ on:
66
- master
77

88
jobs:
9-
set_version_tag:
9+
set-version-tag:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- name: Checkout Code
1313
uses: actions/checkout@v2
1414
- name: Set Version Tag
1515
run: |
1616
make set_new_version_tag
17+
18+
trigger-build-CIs:
19+
needs: set-version-tag
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: Trigger Python Build CI
23+
uses: peter-evans/repository-dispatch@v1
24+
with:
25+
token: ${{ github.token }}
26+
repository: ECTLab/AIaaS-gRPC-protos
27+
event-type: tag-created
28+
client-payload: '{"tag_name": "$(git tag --sort=-version:refname --list `v[0-9]*.[0-9]*.[0-9]*` | head -n1)"}'

0 commit comments

Comments
 (0)