This repository has been archived by the owner on Sep 19, 2024. It is now read-only.
Update submodules #118
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Update submodules | |
on: | |
schedule: | |
- cron: "0 6 * * 01" # every monday at 6 am (UTC) | |
workflow_dispatch: | |
env: | |
COMMIT_MESSAGE: "chore: update submodules" | |
jobs: | |
sync-shared-submodule: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
submodules: "true" | |
- name: Pull Remote Changes | |
run: git pull | |
- name: Update submodule | |
run: | | |
git submodule update --init --remote | |
echo "NEW_BRANCH=update-submodules-${GITHUB_SHA}" >> $GITHUB_ENV | |
- name: Commit changes | |
uses: stefanzweifel/git-auto-commit-action@v4 | |
with: | |
branch: ${{ env.NEW_BRANCH }} | |
create_branch: true | |
commit_message: ${{ env.COMMIT_MESSAGE }} | |
commit_user_name: eclipse-edc-bot | |
commit_user_email: [email protected] | |
commit_author: eclipse-edc-bot <[email protected]> | |
- name: Create a pull request | |
id: create_a_pull_request | |
uses: vsoch/pull-request-action@master | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
PULL_REQUEST_BRANCH: "main" | |
PULL_REQUEST_FROM_BRANCH: ${{ env.NEW_BRANCH }} | |
PULL_REQUEST_TITLE: ${{ env.COMMIT_MESSAGE }} |