Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
viljarjf committed May 12, 2022
2 parents 9926786 + 6ae5153 commit 3a62fc4
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 2 deletions.
47 changes: 46 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,47 @@
# action-update-submodule
Action for Github actions to trigger an update of a single submodule
Action for Github actions to trigger an update of a single submodule.

Add a workflow with this action in your submodule to trigger a PR with an update of this repo on the parent repo.

Any other submodules that might be present in the parent repo are ignored

## Usage

Example workflow:

```yml
name: Submodule Update

on:
push:
branches: [main]

jobs:
build:
name: Submodule update
runs-on: ubuntu-latest

steps:
- name: 'Update submodule on parent'
uses: 'RevolveNTNU/action-update-submodule@v1'
with:
self_dot_git: 'my_test_submodule.git'

name: 'Test submodule'

pat_token: ${{ secrets.PAT_TOKEN }}

pr_branch_name: 'submodule-update'

target_branch: 'dev'

parent_repository: 'parent'

checkout_branch: 'main'

owner: 'RevolveNTNU'
```
This file should be placed in the `my_test_submodule`-repo.

This would make a pull request on `dev` in the repo `RevolveNTNU/parent`, updating the `my_test_submodule`-submodule to the latest `main`.
1 change: 0 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ runs:
ref: ${{ inputs.target_branch }}
submodules: true
token: ${{ inputs.pat_token }}
path: ${{ github.repository }}

- name: Update submodule
shell: bash
Expand Down

0 comments on commit 3a62fc4

Please sign in to comment.