Skip to content

Action for Github actions to trigger an update of a single submodule

Notifications You must be signed in to change notification settings

RevolveNTNU/action-update-submodule

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 

Repository files navigation

action-update-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:

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.

The permissions required on the GitHub fine-grained token are as follows:

  • Metadata: Read
  • Contents: Read + Write
  • Pull requests: Read + Write

The token can be scoped to only the parent repository.

About

Action for Github actions to trigger an update of a single submodule

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •