Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add script to update submodules daily #4

Merged
merged 2 commits into from
Jul 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
89 changes: 0 additions & 89 deletions .github/workflows/coverage.yaml

This file was deleted.

40 changes: 0 additions & 40 deletions .github/workflows/test.yaml

This file was deleted.

49 changes: 49 additions & 0 deletions .github/workflows/update-submodules.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Update Submodules

on:
push:
branches:
- main
- staging
- dev
schedule:
# Run this workflow daily at 03:17 UTC
- cron: "17 3 * * *"

jobs:
update-submodules:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Update Submodules
run: |
git submodule update --init --remote

- name: Configure Git
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"

- name: Setup SSH
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.DEPLOY_KEY }}

- name: Check for Changes
id: git-check
run: |
echo "::set-output name=changes::$(git status --porcelain)"

- name: Commit and Push if Changes are Present
if: steps.git-check.outputs.changes != ''
run: |
git remote set-url origin [email protected]:${{ github.repository }}.git
git add .
git commit -m "Update submodules"
git push
Loading