Skip to content

Commit e87b0ab

Browse files
authored
Merge pull request #222 from openmainframeproject/updatesubmodules-with-signoff
Update updatesubmodules.yml
2 parents 346d309 + 66cca75 commit e87b0ab

File tree

1 file changed

+20
-23
lines changed

1 file changed

+20
-23
lines changed
Lines changed: 20 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,24 @@
1-
---
2-
name: Submodule Updates
3-
1+
name: Sync Submodules
42
on: workflow_dispatch
53
jobs:
6-
build:
7-
name: Submodule update
8-
runs-on: ubuntu-latest
9-
env:
10-
PARENT_REPOSITORY: 'openmainframeproject/software-discovery-tool'
11-
CHECKOUT_BRANCH: 'auto-submodules'
12-
PR_AGAINST_BRANCH: 'master'
13-
OWNER: 'openmainframeproject'
144

5+
repo_sync:
6+
name: Sync with Main repo
7+
runs-on: ubuntu-latest
158
steps:
16-
- name: Checkout Code
17-
uses: actions/checkout@v2
18-
19-
- name: run action
20-
id: run_action
21-
uses: releasehub-com/github-action-create-pr-parent-submodule@v1
22-
with:
23-
github_token: ${{ secrets.SDT_PAT_PUSH }}
24-
parent_repository: ${{ env.PARENT_REPOSITORY }}
25-
checkout_branch: ${{ env.CHECKOUT_BRANCH}}
26-
pr_against_branch: ${{ env.PR_AGAINST_BRANCH }}
27-
owner: ${{ env.OWNER }}
9+
- name: ssh and git module update
10+
uses: appleboy/ssh-action@master
11+
with:
12+
host: ${{ secrets.HOST }}
13+
username: ${{ secrets.USERNAME }}
14+
key: ${{ secrets.KEY }}
15+
script: |
16+
cd ~/software-discovery-tool
17+
git checkout -b "$(date +%b%d)"
18+
cd ~/software-discovery-tool/distro_data
19+
git checkout main
20+
git pull origin main
21+
cd ~/software-discovery-tool
22+
git remote remove git_update
23+
git remote add git_update https://${{ secrets.SDT_USER_PUSH }}:${{ secrets.SDT_PAT_PUSH }}@github.com/openmainframeproject/software-discovery-tool.git
24+
git commit -sam "Auto updated submodule references" && git push git_update "$(date +%b%d)" || echo "No changes to commit"

0 commit comments

Comments
 (0)