-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (30 loc) · 1.05 KB
/
push-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
36
37
name: "Submodule Notify Parent"
on:
push:
branches:
- main
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
notify:
name: "Submodule Notify Parent"
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: Checkout
uses: actions/checkout@v3
# Update references
- name: Sumbodule Pull
run: |
git pull origin main
- name: Github REST API Call
env:
CI_TOKEN: ${{ secrets.PRIVATE_TOKEN_GITHUB }}
PARENT_REPO: IlirEdis/edis-global
PARENT_BRANCH: main
WORKFLOW_ID: 60486470
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 }}"}'