84 lines
2.4 KiB
YAML
84 lines
2.4 KiB
YAML
name: ReBuild macros tips
|
|
|
|
run-name: "ReBuild macros tips"
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.10'
|
|
|
|
- name: Set up Node.js
|
|
uses: actions/setup-node@v4
|
|
|
|
- name: Checkout web-apps repository
|
|
uses: actions/checkout@v4
|
|
with:
|
|
path: web-apps
|
|
|
|
- name: Check if branch exists and set checkout branch
|
|
run: |
|
|
BRANCH_EXISTS=$(git ls-remote --heads https://github.com/ONLYOFFICE/web-apps ${{ github.ref_name }} | wc -l)
|
|
BRANCH=$([ "$BRANCH_EXISTS" == "1" ] && echo "${{ github.ref_name }}" || echo "")
|
|
echo "BRANCH=$BRANCH" >> $GITHUB_ENV
|
|
echo "Using branch: ${BRANCH:-default branch}"
|
|
|
|
- name: Checkout web-apps repository
|
|
uses: actions/checkout@v4
|
|
with:
|
|
repository: ONLYOFFICE/web-apps
|
|
token: ${{ secrets.READ_PAT }}
|
|
ref: ${{ env.BRANCH }}
|
|
path: web-apps
|
|
|
|
- name: Checkout build_tools repository
|
|
uses: actions/checkout@v4
|
|
with:
|
|
repository: ONLYOFFICE/build_tools
|
|
token: ${{ secrets.READ_PAT }}
|
|
ref: ${{ env.BRANCH }}
|
|
path: build_tools
|
|
|
|
- name: Checkout sdkjs repository
|
|
uses: actions/checkout@v4
|
|
with:
|
|
repository: ONLYOFFICE/sdkjs
|
|
token: ${{ secrets.READ_PAT }}
|
|
ref: ${{ env.BRANCH }}
|
|
path: sdkjs
|
|
|
|
- name: Checkout sdkjs-forms repository
|
|
uses: actions/checkout@v4
|
|
with:
|
|
repository: ONLYOFFICE/sdkjs-forms
|
|
token: ${{ secrets.READ_PAT }}
|
|
ref: ${{ env.BRANCH }}
|
|
path: sdkjs-forms
|
|
|
|
- name: Set up Git
|
|
run: |
|
|
git config --global user.name "github-actions[bot]"
|
|
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
|
|
|
- name: Build marcos tips
|
|
run: |
|
|
cd build_tools/scripts/sdkjs_common
|
|
npm install
|
|
python generate_builder_intarface.py
|
|
cd ../../../../web-apps
|
|
|
|
if ! git diff --exit-code; then
|
|
git add .
|
|
git commit -m "Update plugin Macros tips from GitHub Actions"
|
|
git push origin ${{ github.ref_name }}
|
|
else
|
|
echo "Nothing to commit"
|
|
fi
|