-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
22 additions
and
19 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 |
---|---|---|
@@ -1,29 +1,30 @@ | ||
name: "Submodule Notify Parent" | ||
name: Send submodule updates to parent repo | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
jobs: | ||
notify: | ||
name: "Submodule Notify Parent" | ||
update: | ||
runs-on: ubuntu-latest | ||
|
||
# Use the Bash shell regardless whether the GitHub Actions runner is ubuntu-latest, macos-latest, or windows-latest | ||
defaults: | ||
run: | ||
shell: bash | ||
|
||
steps: | ||
- name: Github REST API Call | ||
env: | ||
CI_TOKEN: ${{ secrets.PRIVATE_TOKEN_GITHUB }} | ||
PARENT_REPO: IlirEdis/edis-global | ||
PARENT_BRANCH: main | ||
WORKFLOW_ID: 60486470 | ||
- uses: actions/checkout@v3 | ||
with: | ||
repository: IlirEdis/docs | ||
token: ${{ secrets.PRIVATE_TOKEN_GITHUB }} | ||
submodules: true | ||
|
||
- name: Pull & update submodules recursively | ||
run: | | ||
git submodule update --init --recursive | ||
git submodule update --recursive --remote | ||
- name: Commit | ||
run: | | ||
curl -fL --retry 3 -X POST -H "Accept: application/vnd.github.v3+json" -H "Authorization: token ${{ env.CI_TOKEN }}" https://api.github.com/repos/${{ env.PARENT_REPO }}/actions/workflows/${{ env.WORKFLOW_ID }}/dispatches -d '{"ref":"${{ env.PARENT_BRANCH }}"}' | ||
git config user.email "[email protected]" | ||
git config user.name "IlirEdis" | ||
git add --all | ||
git commit -m "Update submodules" || echo "No changes to commit" | ||
git push edisOrigin main |
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 |
---|---|---|
|
@@ -9,5 +9,5 @@ console.log(a); | |
## Component | ||
|
||
import { useState } from "react"; | ||
|
||
## External Component |
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