Skip to content

Commit ccfb695

Browse files
committed
ci: Add fork-specific build and test workflows
1 parent c2df488 commit ccfb695

2 files changed

Lines changed: 26 additions & 3 deletions

File tree

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
name: fork-test-and-build
1+
name: fork-build
22

33
on:
4-
push:
5-
branches: [ "main", "master" ]
4+
workflow_dispatch:
65

76
env:
87
REGISTRY: ghcr.io

.github/workflows/fork-test.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: fork-test
2+
3+
on:
4+
push:
5+
branches: [ "main", "master" ]
6+
7+
env:
8+
REGISTRY: ghcr.io
9+
REPO_LOWER: ${{ github.repository_owner }}/${{ github.event.repository.name }}
10+
GHCR_REPO: ghcr.io/${{ github.repository }}
11+
WIN_EXE_PYTHON_VERSION: 3.12.9
12+
jobs:
13+
check-repository:
14+
name: Check if running in main repository
15+
runs-on: ubuntu-latest
16+
outputs:
17+
is_main_repo: ${{ github.repository == 'Byaidu/PDFMathTranslate' }}
18+
steps:
19+
- run: echo "Running repository check"
20+
21+
test:
22+
uses: ./.github/workflows/python-test.yml
23+
needs: check-repository
24+
if: needs.check-repository.outputs.is_main_repo != 'true'

0 commit comments

Comments
 (0)