-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (36 loc) · 1.57 KB
/
Update Submodule Reference.yml
File metadata and controls
43 lines (36 loc) · 1.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: Update Submodule Reference in PropertyGridHelpers
on:
# push:
# branches:
# - main # Trigger on changes to the 'main' branch of PropertyGridHelpers.CodeCoverage
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
update-main-repo:
runs-on: ubuntu-latest
steps:
- name: Checkout Submodule Repository
uses: actions/checkout@v4
- name: Clone Main Repository
run: |
# Clone the PropertyGridHelpers repository
git clone --depth 1 https://github.com/dparvin/PropertyGridHelpers.git main-repo
cd main-repo
git config user.name "GitHub Actions"
git config user.email "actions@github.com"
- name: Initialize and Update Submodule
run: |
cd main-repo
# Initialize the submodule
git submodule update --init Coverage
# Ensure the submodule points to the latest commit in the submodule repository
git submodule update --remote --merge Coverage
- name: Commit and Push Updated Submodule Reference
run: |
cd main-repo
git add Coverage
git commit -m "Update submodule reference to latest commit in PropertyGridHelpers.CodeCoverage" || echo "No changes to commit"
git push https://x-access-token:${{ secrets.PAT_TOKEN }}@github.com/dparvin/PropertyGridHelpers.git master
# Create and push a 'no-build' tag
git tag no-build
git push https://x-access-token:${{ secrets.PAT_TOKEN }}@github.com/dparvin/PropertyGridHelpers.git no-build