Skip to content

Update libspm-update.yml #4

Update libspm-update.yml

Update libspm-update.yml #4

Workflow file for this run

name: Update Submodule
on:
push:
branches:
- main
jobs:
update:
runs-on: ubuntu-latest
steps:
- name: Checkout parent repo
uses: actions/checkout@v2
with:
submodules: recurse
token: ${{ secrets.GITHUB_TOKEN }}
- name: Configure Git
run: |
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
- name: Update submodule
run: |
set -x # Enable debug logging
git checkout -b update-submodule
(cd lib/cutils && git pull origin main)
git add .
git commit -m "Update submodule to latest commit" || echo "Nothing to commit"
- name: Push changes
if: success() && steps.update.outputs.changes == 'true'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git push origin update-submodule
- name: Create Pull Request
if: success() && steps.update.outputs.changes == 'true'
uses: peter-evans/create-pull-request@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
title: "Update submodule"
body: "This PR updates the submodule to the latest commit."
branch: "update-submodule"