File tree Expand file tree Collapse file tree 1 file changed +20
-23
lines changed
Expand file tree Collapse file tree 1 file changed +20
-23
lines changed Original file line number Diff line number Diff line change 1- ---
2- name : Submodule Updates
3-
1+ name : Sync Submodules
42on : workflow_dispatch
53jobs :
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"
You can’t perform that action at this time.
0 commit comments