-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci(submodule): automatic update submodule on gh-pages push (#79)
Signed-off-by: Thuan Vo <[email protected]> (cherry picked from commit b19dd6c)
- Loading branch information
1 parent
59d164d
commit 8a0b882
Showing
1 changed file
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: submodule | ||
|
||
on: | ||
push: | ||
branches: | ||
- gh-pages | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
jobs: | ||
update-submodule: | ||
if: ${{ github.repository_owner == 'cryostatio' }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
repository: cryostatio/cryostatio.github.io | ||
token: "${{ secrets.SUBMODULE_TOKEN }}" | ||
- name: Update submodule to latest commit | ||
run: | | ||
git submodule update --init | ||
git submodule update --remote | ||
- name: Commit and push submodule | ||
run: | | ||
git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | ||
git config user.name "github-actions[bot]" | ||
git add --all | ||
git_hash="$(git rev-parse --short :helm-charts)" | ||
git commit -m "build(helm-charts): update submodule to $git_hash" || echo "No changes to commit" | ||
git push |