Skip to content
This repository was archived by the owner on Jun 26, 2026. It is now read-only.

Reference the commit #13

Reference the commit

Reference the commit #13

name: Update OrchardCoreContrib.App Submodules
on:
push:
branches: [ "main" ]
jobs:
update-submodules:
name: Build windows-latest
runs-on: windows-latest
steps:
- name: Checkout OrchardCoreContrib.App
uses: actions/checkout@v6
with:
repository: OrchardCoreContrib/OrchardCoreContrib.App
submodules: true
token: ${{ secrets.OCC_TOKEN }}
- name: Update submodules
run: |
git submodule sync --recursive
git submodule update --init --recursive
git submodule update --recursive --remote
- name: Get updated submodule commit hash
id: submodule-hash
shell: pwsh
run: |
$line = (git submodule status --recursive | Select-Object -First 1).Trim()
$hash = ($line -split '\s+')[0].TrimStart('-','+')
$shortHash = $hash.Substring(0,7)
$commitUrl = "https://github.com/OrchardCoreContrib/OrchardCoreContrib.App/commit/$hash"
"full=$hash" >> $env:GITHUB_OUTPUT
"short=$shortHash" >> $env:GITHUB_OUTPUT
"url=$commitUrl" >> $env:GITHUB_OUTPUT
- name: Create Pull Request
uses: peter-evans/create-pull-request@v7
with:
token: ${{ secrets.OCC_TOKEN }}
commit-message: Update submodule to latest version
title: Update OCC.Library submodule to commit ${{ steps.submodule-hash.outputs.short }}
body: |
Automated submodule update generated by workflow.
Commit: [`${{ steps.submodule-hash.outputs.short }}`](${{ steps.submodule-hash.outputs.url }})
branch: update-submodules
delete-branch: true
base: main
labels: |
dependencies
submodule
# - name: Commit and push changes
# env:
# OCC_TOKEN: ${{ secrets.OCC_TOKEN }}
# run: |
# git config user.name "github-actions[bot]"
# git config user.email "github-actions[bot]@users.noreply.github.com"
# git add --all
# git diff --cached --quiet && exit 0
# git commit -m "Update submodules to latest versions"
# git remote set-url origin https://x-access-token:${OCC_TOKEN}@github.com/OrchardCoreContrib/OrchardCoreContrib.App.git
# git push origin HEAD:main