From 4ea7ac46a3f5637a7d1a11c58d6a1ea2370cdc3e Mon Sep 17 00:00:00 2001 From: David Senoner Date: Tue, 17 Sep 2024 10:51:50 +0200 Subject: [PATCH] Create initial gh action for updating tiling dotfiles --- .github/workflows/submodules.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/submodules.yml diff --git a/.github/workflows/submodules.yml b/.github/workflows/submodules.yml new file mode 100644 index 0000000..ba97775 --- /dev/null +++ b/.github/workflows/submodules.yml @@ -0,0 +1,31 @@ +name: Send submodule updates to parent repo + +on: + push: + branches: + - main + +jobs: + update: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + with: + repository: kada49/.dotfiles + ref: tiling + token: ${{ secrets.GH_PAT }} + 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" + git add --all + git commit -m "Update submodules" || echo "No changes to commit" + git push