mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-01 03:37:15 -06:00
9b5c5ae0d3
Bumps [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request) from 6 to 7. - [Release notes](https://github.com/peter-evans/create-pull-request/releases) - [Commits](https://github.com/peter-evans/create-pull-request/compare/v6...v7) --- updated-dependencies: - dependency-name: peter-evans/create-pull-request dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
45 lines
1.4 KiB
YAML
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@v4
|
|
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@v7
|
|
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
|