-
Notifications
You must be signed in to change notification settings - Fork 3
42 lines (38 loc) · 1.63 KB
/
Copy pathpackage-check.yml
File metadata and controls
42 lines (38 loc) · 1.63 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
42
name: Package Check
on:
workflow_run:
workflows: [Check]
types: [completed]
branches: [main, master]
workflow_dispatch:
concurrency:
group: package-check-${{ github.ref }}
cancel-in-progress: true
jobs:
paths-filter:
runs-on: ubuntu-latest
outputs:
packaging: ${{ steps.filter.outputs.packaging }}
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 2
ref: ${{ github.event.workflow_run.head_sha || github.sha }}
- id: filter
shell: bash
run: |
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
echo "packaging=true" >> "$GITHUB_OUTPUT"
elif git diff --name-only HEAD~1 HEAD 2>/dev/null | grep -qE '^(aao/|custom/|resource/|examples/|aao\.spec|pyproject\.toml|uv\.lock|package\.json|pnpm-lock\.yaml|logo\.png|\.github/workflows/(package-check|_build)\.yml)'; then
echo "packaging=true" >> "$GITHUB_OUTPUT"
else
echo "packaging=false" >> "$GITHUB_OUTPUT"
echo "No packaging files changed, skipping build"
fi
build:
needs: paths-filter
if: ${{ needs.paths-filter.outputs.packaging == 'true' && (github.event.workflow_run.conclusion == 'success' || github.event_name == 'workflow_dispatch') }}
uses: ./.github/workflows/_build.yml
with:
artifact_name: check-build
archive_prefix: ArknightsAutoOperator-check-${{ github.event.workflow_run.head_sha || github.sha }}