-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yml
35 lines (35 loc) · 1.34 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
name: update-submodules
description: Update submodules (remotely, using the Github API, without cloning anything)
branding:
color: "purple"
icon: "git-commit"
inputs:
repository:
description: The name of the repository to update
default: ${{ github.repository }}
branch:
description: The name of the branch to update
default: ${{ github.event.pull_request && github.head_ref || github.ref_name }}
refs:
description: "One or more <submodule>=<ref> arguments indicating which ref to update each submodule to. An argument like <ref> (with no \"=\") sets a default for all submodules, otherwise each submodule's remote HEAD will be used."
token:
description: GitHub token with push access to the repo
required: true
version:
description: "Version of the `update-submodules` PyPI library to use"
outputs:
commit:
description: The SHA of the newly-created commit
value: ${{ steps.update.outputs.commit }}
runs:
using: "composite"
steps:
- name: Install git-update-submodules
run: pip install update-submodules${{ inputs.version && format('=={0}', inputs.version) }}
shell: bash
- name: Update submodules
id: update
run: github-update-submodules -R${{ inputs.repository }} -b${{ inputs.branch }} ${{ inputs.refs }}
shell: bash
env:
GITHUB_TOKEN: ${{ inputs.token }}