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

Fix github actions warnings when updating submodules #7

Merged
merged 3 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
21 changes: 13 additions & 8 deletions .github/workflows/update-submodules.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
name: Update Submodules

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

jobs:
update-submodules:
Expand All @@ -30,15 +31,19 @@ jobs:
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)"
if [ -n "$(git status --porcelain)" ]; then
echo "changes=changes present" >> $GITHUB_OUTPUT
else
echo "changes=" >> $GITHUB_OUTPUT
fi

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

- name: Commit and Push if Changes are Present
if: steps.git-check.outputs.changes != ''
Expand Down
Loading