From ede7fcf6029e8e7d2f61111798c34a08e9c9a318 Mon Sep 17 00:00:00 2001 From: bohdan-s Date: Mon, 6 Feb 2023 09:27:12 +1100 Subject: [PATCH] Push updates to hassio-repository --- .github/workflows/update-addon.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/update-addon.yml diff --git a/.github/workflows/update-addon.yml b/.github/workflows/update-addon.yml new file mode 100644 index 0000000..1d37c73 --- /dev/null +++ b/.github/workflows/update-addon.yml @@ -0,0 +1,30 @@ +name: Send submodule updates to parent repo + +on: + push: + branches: + - main + +jobs: + update: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + with: + repository: bohdan-s/hassio-repository + token: ${{ secrets.PRIVATE_TOKEN_GITHUB }} + submodules: true + + - name: Pull & update submodules recursively + run: | + git submodule update --init --recursive + git submodule update --recursive --remote + + - name: Commit + run: | + git config user.email "actions@github.com" + git config user.name "GitHub Actions - update submodules" + git add --all + git commit -m "Update submodules" || echo "No changes to commit" + git push