Update Bundle-repo #12
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: | |
ECCKEY_B_ID_RSA: ${{secrets.ECCKEY_B_ID_RSA}} | |
steps: | |
- name: Update ecckey_b | |
run: | | |
mkdir -p ~/.ssh | |
echo "$ECCKEY_B_ID_RSA" > ~/.ssh/id_rsa | |
chmod 600 ~/.ssh/id_rsa | |
git clone git@github.com:vovkos/ecckey_b | |
cd ecckey_b | |
git submodule update --init | |
git submodule foreach git checkout master | |
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 |