Skip to content

Commit

Permalink
Add github workflows - Create PR to update James submodule
Browse files Browse the repository at this point in the history
  • Loading branch information
vttranlina authored Oct 22, 2024
1 parent 01836a1 commit 3317a50
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/update-james-submodule.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Create PR to update James submodule

on:
schedule:
- cron: '1 */4 * * *'
workflow_dispatch:

jobs:
createPullRequest:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Check if submodule is updated
id: check-submodule
run: |
git submodule update --remote -- james-project
git config user.name 'github[bot]'
git config user.email '[email protected]'
if [ "$(git diff --submodule=log)" != "" ]; then
echo "Submodule has changes"
git add james-project
echo "changed=yes" >> $GITHUB_OUTPUT
else
echo "No changes in submodule"
echo "changed=no" >> $GITHUB_OUTPUT
fi
- name: Create Pull Request to Upstream if submodule updated
if: ${{ steps.check-submodule.outputs.changed == 'yes' }}
uses: peter-evans/create-pull-request@v7
with:
commit-message: Update James SHA-1
title: "Update James submodule to latest version"
body: |
This pull request updates the James SHA-1 submodule to the latest version.
branch: upgradeSha1
base: master
labels: bot
delete-branch: true

0 comments on commit 3317a50

Please sign in to comment.