|
| 1 | +name: Build and Push Tag to https://github.com/ECTLab/AIaaS-gRPC-protos-Autogenerated-Golang |
| 2 | + |
| 3 | +on: [push] |
| 4 | + |
| 5 | +env: |
| 6 | + DESTINATION_REPO: ECTLab/AIaaS-gRPC-protos-Autogenerated-Golang |
| 7 | + DESTINATION_BRANCH: master |
| 8 | + DESTINATION_TOKEN: ${{ secrets.PYTHON_DESTINATION_TOKEN }} |
| 9 | + |
| 10 | +jobs: |
| 11 | + build-and-push: |
| 12 | + runs-on: ubuntu-latest |
| 13 | + steps: |
| 14 | + - name: Checkout source code |
| 15 | + uses: actions/checkout@v2 |
| 16 | + with: |
| 17 | + ref: ${{ github.ref }} |
| 18 | + |
| 19 | + - name: Install dependencies |
| 20 | + run: | |
| 21 | + make install_python_requirements |
| 22 | + |
| 23 | + - name: Build |
| 24 | + run: | |
| 25 | + export PATH=$PATH:$(go env GOPATH)/bin |
| 26 | + make generate_golang_protos |
| 27 | + ls -l ./golang |
| 28 | +
|
| 29 | + # - name: Checkout destination repo |
| 30 | + # uses: actions/checkout@v2 |
| 31 | + # with: |
| 32 | + # repository: ${{ env.DESTINATION_REPO }} |
| 33 | + # ref: ${{ env.DESTINATION_BRANCH }} |
| 34 | + # token: ${{ env.DESTINATION_TOKEN }} |
| 35 | + # path: destination-repo |
| 36 | + |
| 37 | + # - name: Copy files |
| 38 | + # run: | |
| 39 | + # rm -rf destination-repo/AIaaS_interface/ |
| 40 | + # mkdir -p destination-repo/AIaaS_interface/ |
| 41 | + # cp -r AIaaS_interface/* destination-repo/AIaaS_interface/ |
| 42 | + |
| 43 | + # - name: Commit changes |
| 44 | + # run: | |
| 45 | + # bash -c "if [[ ${{ github.ref }} == 'refs/tags/'* ]]; then export TAG_NAME=${{ github.ref }}; fi" |
| 46 | + # echo "Tag name: $TAG_NAME" |
| 47 | + # echo "payload: ${{ github.event.client_payload.tag_name }}" |
| 48 | + # cd destination-repo |
| 49 | + # git config user.email "m.mahdi.m79@gmail.com" |
| 50 | + # git config user.name "Mohammad Mahdi Malmasi" |
| 51 | + # git add . |
| 52 | + # git commit -m "Update for tag: $TAG_NAME" |
| 53 | + # git tag $TAG_NAME |
| 54 | + # git push --tags |
| 55 | + # git push origin master |
| 56 | + # env: |
| 57 | + # TAG_NAME: ${{ github.event.client_payload.tag_name }} |
0 commit comments