Update Bundle-repo #117
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: Update Bundle-repo | |
on: | |
workflow_run: | |
workflows: ["GitHub CI"] | |
branches: [master] | |
types: [completed] | |
jobs: | |
updateBundle: | |
if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
runs-on: ubuntu-20.04 | |
env: | |
JANCY_B_ID_RSA: ${{secrets.JANCY_B_ID_RSA}} | |
steps: | |
- name: Update jancy_b | |
run: | | |
mkdir -p ~/.ssh | |
echo "$JANCY_B_ID_RSA" > ~/.ssh/id_rsa | |
chmod 600 ~/.ssh/id_rsa | |
git clone --depth 1 [email protected]:vovkos/jancy_b | |
cd jancy_b | |
git submodule update --init | |
git submodule foreach 'case $name in re2s) git checkout re2s-no-abseil;; *) git checkout master;; esac' | |
git submodule foreach 'git pull' | |
COMMIT_MESSAGE=$(perl ./axl/ci/github-actions/get-submodule-update-commit-message.pl) | |
if [[ "$COMMIT_MESSAGE" == "" ]]; then | |
echo "nothing to commit, submodules are up-to-date." | |
exit 0 | |
fi | |
git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
git config user.name "GitHub Actions" | |
git commit --all --message "$COMMIT_MESSAGE" | |
git push |