Skip to content

Commit

Permalink
Add PR creation and comments to action. (#130)
Browse files Browse the repository at this point in the history
  • Loading branch information
nishkrishnan authored and msarvar committed Oct 18, 2021
1 parent d4c8599 commit aeaab43
Showing 1 changed file with 23 additions and 10 deletions.
33 changes: 23 additions & 10 deletions .github/workflows/update_parent.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,30 @@ jobs:
repository: ${{ secrets.PARENT_REPOSITORY }}
token: ${{ secrets.PARENT_REPO_TOKEN }}

- name: init
- name: submodule / init
run: |
git submodule update --init --recursive
- name: update remote
- name: submodule / update
run: |
git submodule update --recursive --remote
- name: commit
run: |
git config user.email "[email protected]"
git config user.name "$GITHUB_ACTOR"
git checkout -b "update-submodule-${{ github.sha }}"
git add --all
git commit -m "Update submodules" || echo "No changes to commit"
git push -u origin update-submodule-${{ github.sha }}
- name: pull request / create
id: cpr
uses: peter-evans/create-pull-request@v3
with:
token: ${{ secrets.PARENT_REPO_TOKEN }}
commit-message: Update Submodule to sha ${{ github.sha }}
branch-suffix: short-commit-hash
title: '[AUTOGENERATED] Update Submodule to sha ${{ github.sha }}'
body: |
Auto-generated by [create-pull-request][1]
[1]: https://github.com/peter-evans/create-pull-request
draft: false
- name: pull request / tag channel
uses: peter-evans/create-or-update-comment@v1
with:
token: ${{ secrets.PARENT_REPO_TOKEN }}
repository: ${{ secrets.PARENT_REPOSITORY }}
issue-number: ${{ steps.cpr.outputs.pull-request-number }}"
body: |
/ptal #orchestration

0 comments on commit aeaab43

Please sign in to comment.