add git pull #36
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build workflow | |
on: | |
push: | |
branches-ignore: | |
- 'master' | |
tags-ignore: | |
- '**' | |
paths: | |
- '.github/workflows/build.yaml' | |
- 'api/binding.h' | |
- 'api/libgo_owasm.dylib' | |
- 'api/libgo_owasm.so' | |
- 'libgo_owasm/**' | |
- 'build/**' | |
- 'Makefile' | |
jobs: | |
build_shared_lib_linux: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Build docker images | |
run: | | |
make docker-image-linux | |
- name: Build shared libs | |
run: | | |
make release-linux | |
- name: Check if there is any change | |
id: check-diff | |
run: | | |
git add -A | |
git diff HEAD --quiet || echo "diff=true" >> $GITHUB_OUTPUT | |
- name: Commit and Push libs | |
if: steps.check-diff.outputs.diff == 'true' | |
run: | | |
git pull | |
git config --global user.name 'Builder' | |
git config --global user.email '[email protected]' | |
git commit -am "Built shared lib - linux" | |
git push | |
build_shared_lib_osx: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Build docker images | |
run: | | |
make docker-image-osx | |
- name: Build shared libs | |
run: | | |
make release-osx | |
- name: Check if there is any change | |
id: check-diff | |
run: | | |
git add -A | |
git diff HEAD --quiet || echo "diff=true" >> $GITHUB_OUTPUT | |
- name: Commit and Push libs | |
if: steps.check-diff.outputs.diff == 'true' | |
run: | | |
git pull | |
git config --global user.name 'Builder' | |
git config --global user.email '[email protected]' | |
git commit -am "Built shared lib - osx" | |
git push |