Skip to content

Commit

Permalink
Fix workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
StrangeRanger committed Nov 16, 2024
1 parent 498ba51 commit 32eef5f
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions .github/workflows/update_dotfiles.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
name: Update Submodule

on:
# Run this workflow daily at midnight UTC
schedule:
- cron: '0 0 * * *'
# Allow manual triggering
workflow_dispatch:

jobs:
Expand All @@ -15,7 +13,7 @@ jobs:
- name: Checkout Repository
uses: actions/checkout@v3
with:
submodules: recursive # Ensures submodules are checked out
submodules: recursive

- name: Configure Git User
run: |
Expand All @@ -25,10 +23,11 @@ jobs:
- name: Update Submodule
run: |
git submodule update --remote --merge submodules/dotfiles
git add submodules/dotfiles
git commit -m "CI: Update submodule to latest commit"
git push
- name: Verify Submodule Status
run: git submodule status
if [[ -n "$(git status --porcelain)" ]]; then
git add submodules/dotfiles
git commit -m "CI: Update submodule to latest commit"
git push
else
echo "No changes to commit"
fi

0 comments on commit 32eef5f

Please sign in to comment.