Skip to content

fix:spelling

fix:spelling #23

Workflow file for this run

name: Run createSchemas.py on push to /schemas
on:
push:
paths:
- 'schemas/**'
workflow_dispatch: # Allows manual triggering of the workflow
jobs:
run-create-schemas:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run createSchemas.py
run: python src/createSchemas.py
- name: Set up Git user
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
- name: Commit changes to current repo
run: |
git add locales/en/schema.json
git commit -m "Update schema.json [from GitHub Actions]"
git push origin main
env:
SECOND_REPO_PAT: ${{ secrets.SECOND_REPO_PAT }}
- name: Clone and Create new branch and commit changes
run: |
git clone "https://x-access-token:${{ secrets.SECOND_REPO_PAT }}@github.com/sdsc-ordes/imaging-plaza-frontend-public.git"
cd imaging-plaza-frontend-public
git checkout -b update-schema-${{ github.run_id }}
cp ../locales/en/schema.json locales/en/
git add locales/en/schema.json
git commit -m "Update schema.json [from GitHub Actions]"
git push https://x-access-token:${{ secrets.SECOND_REPO_PAT }}@github.com/sdsc-ordes/imaging-plaza-frontend-public.git
gh pr create --base develop --head update-schema-${{ github.run_id }} --title "Update schema.json [from GitHub Actions]" --body "This PR updates the `schema.json` file in the `locales/en` directory. Generated by GitHub Actions as part of the workflow."
env:
SECOND_REPO_PAT: ${{ secrets.SECOND_REPO_PAT }}
- name: Verify remote branches debug
run: |
cd imaging-plaza-frontend-public
git fetch origin develop
git branch -r # List all remote branches to verify 'origin/develop' exists
# - name: Create Pull Request
# uses: peter-evans/create-pull-request@v7
# with:
# token: ${{ secrets.SECOND_REPO_PAT }}
# branch: update-schema-${{ github.run_id }} # This is the new branch name
# base: develop # The base branch you want to merge into (ensure 'develop' exists)
# title: "Update schema.json [from GitHub Actions]"
# commit-message: chore:update schema.json
# body: |
# This PR updates the `schema.json` file in the `locales/en` directory.
# Generated by GitHub Actions as part of the workflow.
# env:
# SECOND_REPO_PAT: ${{ secrets.SECOND_REPO_PAT }}