From 5407df0d9f7198cf3dc01d2171b009c77f6e1959 Mon Sep 17 00:00:00 2001 From: IlirEdis Date: Fri, 16 Jun 2023 18:49:59 +0200 Subject: [PATCH] new aciton --- .github/workflows/push-action.yml | 37 ++++++++++++++++--------------- another.mdx | 2 +- index.mdx | 2 ++ 3 files changed, 22 insertions(+), 19 deletions(-) diff --git a/.github/workflows/push-action.yml b/.github/workflows/push-action.yml index 73e04c9..e1bf3a7 100644 --- a/.github/workflows/push-action.yml +++ b/.github/workflows/push-action.yml @@ -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 "ilir.bajrami@edis.at" + git config user.name "IlirEdis" + git add --all + git commit -m "Update submodules" || echo "No changes to commit" + git push edisOrigin main diff --git a/another.mdx b/another.mdx index be6c305..8cea9a1 100644 --- a/another.mdx +++ b/another.mdx @@ -9,5 +9,5 @@ console.log(a); ## Component import { useState } from "react"; - + ## External Component diff --git a/index.mdx b/index.mdx index 6773f9d..ab86f26 100644 --- a/index.mdx +++ b/index.mdx @@ -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?