File tree Expand file tree Collapse file tree 5 files changed +28
-12
lines changed
Expand file tree Collapse file tree 5 files changed +28
-12
lines changed Original file line number Diff line number Diff line change 1414 DESTINATION_TOKEN : ${{ secrets.PYTHON_DESTINATION_TOKEN }}
1515
1616jobs :
17- build_and_push :
17+ build :
1818 runs-on : ubuntu-latest
1919 steps :
2020 - name : Checkout source code
2929 - name : Build
3030 run : |
3131 make generate_python_protos
32-
32+
3333 - name : Checkout destination repo
3434 uses : actions/checkout@v2
3535 with :
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"
49+ bash -c "if [[ ${{ github.ref }} == 'refs/tags/'* ]]; then export TAG_NAME=${{ github.ref }}; fi"
5150 echo "Tag name: $TAG_NAME"
5251 echo "payload: ${{ github.event.client_payload.tag_name }}"
5352 cd destination-repo
5857 git tag $TAG_NAME
5958 git push --tags
6059 git push origin master
60+ env :
61+ TAG_NAME : ${{ github.event.client_payload.tag_name }}
Original file line number Diff line number Diff line change 11name : Check that new changes can build or not
22
3- on : [push]
3+ on :
4+ push :
5+ branches :
6+ - ' *'
7+ - ' !master'
48
59jobs :
610 build :
Original file line number Diff line number Diff line change @@ -19,10 +19,17 @@ jobs:
1919 needs : set-version-tag
2020 runs-on : ubuntu-latest
2121 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)"}'
22+ - name : Checkout Code
23+ uses : actions/checkout@v2
24+ - name : Send tag-created event
25+ run : |
26+ git fetch --tags
27+ export LAST_TAG=$(git tag --sort=-version:refname --list 'v[0-9]*.[0-9]*.[0-9]*' | head -n1)
28+ echo "LAST_TAG=$LAST_TAG"
29+ curl -L \
30+ -X POST \
31+ -H "Accept: application/vnd.github+json" \
32+ -H "Authorization: Bearer ${{ github.token }}" \
33+ -H "X-GitHub-Api-Version: 2022-11-28" \
34+ https://api.github.com/repos/ECTLab/AIaaS-gRPC-protos/dispatches \
35+ -d '{"event_type":"tag-created","client_payload":{"tag_name":"'"$LAST_TAG"'"}}'
Original file line number Diff line number Diff line change 99set_new_version_tag :
1010 bash ./scripts/generate_new_version_tag.sh
1111
12+ trigger_build_CIs :
13+ bash ./scripts/trigger_build_CIs.sh $(filter-out $@ ,$(MAKECMDGOALS ) )
14+
1215install_python_requirements :
1316 pip install -r $(PYTHON_REQUIREMENTS_FILE_PATH )
1417
Original file line number Diff line number Diff line change 1+ export TH=" HELLO"
You can’t perform that action at this time.
0 commit comments