-
Notifications
You must be signed in to change notification settings - Fork 2
41 lines (35 loc) · 1.12 KB
/
sync-frontend-mirror.yml
File metadata and controls
41 lines (35 loc) · 1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: Sync Frontend Mirror
on:
push:
branches:
- main
paths:
- frontend/**
- scripts/sync-frontend-mirror.sh
- .github/workflows/sync-frontend-mirror.yml
workflow_dispatch:
permissions:
contents: read
concurrency:
group: sync-frontend-mirror
cancel-in-progress: false
jobs:
sync:
runs-on: ubuntu-latest
env:
TARGET_REPO: ${{ vars.GUARDEX_FRONTEND_MIRROR_REPO || 'recodeee/gitguardex-frontend' }}
TARGET_BRANCH: ${{ vars.GUARDEX_FRONTEND_MIRROR_BRANCH || 'main' }}
SOURCE_PREFIX: frontend
SYNC_TOKEN: ${{ secrets.GUARDEX_FRONTEND_MIRROR_PAT }}
steps:
- name: Skip when mirror PAT is missing
if: ${{ env.SYNC_TOKEN == '' }}
run: echo "GUARDEX_FRONTEND_MIRROR_PAT is not configured; skipping frontend mirror sync."
- name: Checkout
if: ${{ env.SYNC_TOKEN != '' }}
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
- name: Sync frontend subtree to mirror repo
if: ${{ env.SYNC_TOKEN != '' }}
run: bash scripts/sync-frontend-mirror.sh