Skip to content

Commit

Permalink
new aciton
Browse files Browse the repository at this point in the history
  • Loading branch information
IlirEdis committed Jun 16, 2023
1 parent ca69cc4 commit 5407df0
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 19 deletions.
37 changes: 19 additions & 18 deletions .github/workflows/push-action.yml
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
2 changes: 1 addition & 1 deletion another.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ console.log(a);
## Component

import { useState } from "react";

## External Component
2 changes: 2 additions & 0 deletions index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

# OK ok ok ok

## kkkkk

Welcome to Nextra! This is a basic docs template. You can use it as a starting point for your own project :)

## What is Nextra?
Expand Down

0 comments on commit 5407df0

Please sign in to comment.