Files
ResInsight/.github/workflows/update-submodules.yml
T
dependabot[bot] 3e126ee091 Bump actions/checkout from 6 to 7
Bumps [actions/checkout](https://github.com/actions/checkout) from 6 to 7.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v6...v7)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-06-22 14:13:54 +02:00

45 lines
1.4 KiB
YAML

name: Update Submodules
on:
schedule:
- cron: '0 0 * * 0' # Runs every Sunday at midnight
workflow_dispatch: # Allows manual triggering of the workflow
jobs:
update-submodules:
runs-on: ubuntu-latest
strategy:
matrix:
submodule:
- tomlplusplus
steps:
- name: Checkout repository
uses: actions/checkout@v7
with:
submodules: recursive
- name: Update submodules to latest release
id: git-change-job
run: |
cd ThirdParty/${{ matrix.submodule }}
git fetch --tags
latest_tag=$(git describe --tags `git rev-list --tags --max-count=1`)
if [ -n "$latest_tag" ]; then
git checkout $latest_tag
echo "LATEST_TAG=$latest_tag" >> "$GITHUB_OUTPUT"
else
echo "Empty tag detected in ${{ matrix.submodule }}. Nothing to do."
fi
- name: Create PR
# The generated PR does not have any tests. Close and reopen the PR to activate tests.
uses: peter-evans/create-pull-request@v8
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "Update ${{ matrix.submodule }} to ${{ steps.git-change-job.outputs.LATEST_TAG }}"
title: "Update ${{ matrix.submodule }} to ${{ steps.git-change-job.outputs.LATEST_TAG }}"
branch: ci-update-${{ matrix.submodule }}
branch-suffix: random