forked from FAIRmat-NFDI/nomad-distro-dev
-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (36 loc) · 1.2 KB
/
Copy pathCI.yaml
File metadata and controls
41 lines (36 loc) · 1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: Update Submodules and Create PR
on:
schedule:
- cron: "0 17 * * 1" # Runs every Monday at 5 PM UTC
workflow_dispatch: # Allows manual triggering
jobs:
update-submodules:
if: github.repository == 'FAIRmat-NFDI/nomad-distro-dev'
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Initialize and Update Submodules
run: |
git submodule init
git submodule update --recursive --remote
- name: Check for Changes
id: check-changes
run: |
if [ -z "$(git status --porcelain)" ]; then
echo "changed=false" >> $GITHUB_OUTPUT
else
echo "changed=true" >> $GITHUB_OUTPUT
fi
- name: Create Pull Request
if: ${{ steps.check-changes.outputs.changed == 'true' }}
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "Update submodules"
title: "Update Submodules"
body: "This pull request updates all submodules to their latest versions."
branch: update-submodules
base: main