diff --git a/.gitea/workflows/mirror-to-backend.yml b/.gitea/workflows/mirror-to-backend.yml new file mode 100644 index 0000000..40c430c --- /dev/null +++ b/.gitea/workflows/mirror-to-backend.yml @@ -0,0 +1,44 @@ +name: Mirror frontend to backend repo + +on: + push: + branches: + - main + +jobs: + mirror: + runs-on: ubuntu-latest + + steps: + - name: Setup SSH + run: | + mkdir -p ~/.ssh + echo "${{ secrets.SUBTREE_SSH_KEY }}" > ~/.ssh/id_ed25519 + chmod 600 ~/.ssh/id_ed25519 + ssh-keyscan 10.25.100.250 >> ~/.ssh/known_hosts + + - name: Clone backend monorepo + run: | + git clone ssh://git@10.25.100.250:2222/serty/goSSS.git + cd goSSS + git checkout main + git config user.name "gitea-ci" + git config user.email "ci@gitea" + + - name: Add frontend remote + run: | + cd goSSS + git remote add front ssh://git@10.25.100.250:2222/serty/goSSS-front.git + + - name: Subtree pull frontend + run: | + cd goSSS + git subtree pull \ + --prefix=front-ui \ + front main \ + --squash + + - name: Push to backend repo + run: | + cd goSSS + git push origin main diff --git a/src/utils/mappers.tsx b/src/utils/mappers.tsx index 31f8749..5bfd9ea 100644 --- a/src/utils/mappers.tsx +++ b/src/utils/mappers.tsx @@ -28,7 +28,7 @@ export const getEntityLabel = (type: string): string => { }; export const getStatusColor = (status?: unknown): AntBadgeStatus => { - // Приведение строки к валидному статусу Badge + // Приведение строки к валидному статусу Badge (check ci) const s = String(status); switch (s) { case 'active':