forked from MissouriMRDT/RoveComm_Base
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from MRDT-Software/patch-1
Create sync.yml
- Loading branch information
Showing
1 changed file
with
67 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
name: Sync RoveComm Repos | ||
|
||
on: | ||
# push: | ||
# branches: | ||
# - master | ||
workflow_dispatch: | ||
|
||
jobs: | ||
update-repos: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
include: | ||
- name: rovecomm | ||
path: manifest | ||
branch: dev | ||
- name: rovecomm-typescript | ||
path: manifest | ||
branch: main | ||
- name: rovecomm_cpp | ||
path: data/RoveComm | ||
branch: development | ||
- name: rovecomm_python | ||
path: manifest | ||
branch: dev | ||
- name: rovecomm_swift | ||
path: Sources/RoveComm_Swift/Resources/Manifest | ||
branch: development | ||
|
||
steps: | ||
- name: Checkout rovecomm_base | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Set up Git | ||
run: | | ||
git config --global user.name 'github-actions[bot]' | ||
git config --global user.email 'github-actions[bot]@users.noreply.github.com' | ||
- name: Generate commit message | ||
id: commit_msg | ||
run: echo "::set-output name=msg::Update due to changes in rovecomm_base" | ||
|
||
- name: Clone and update submodule for ${{ matrix.name }} | ||
run: | | ||
git clone https://github.com/mrdt-software/${{ matrix.name }}.git | ||
cd ${{ matrix.name }} | ||
git submodule update --init --recursive | ||
cd ${{ matrix.path }} | ||
git pull origin main | ||
cd - | ||
git add ${{ matrix.path }} | ||
git commit -m "${{ steps.commit_msg.outputs.msg }}" | ||
git checkout -b update-from-rovecomm-base | ||
git push origin update-from-rovecomm-base | ||
- name: Create pull request for ${{ matrix.name }} | ||
uses: peter-evans/create-pull-request@v4 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
repository: mrdt-software/${{ matrix.name }} | ||
base: ${{ matrix.branch }} | ||
head: update-from-rovecomm-base | ||
title: 'Update from rovecomm_base' | ||
body: 'This is an automated pull request to update the repository due to changes in rovecomm_base.' |