Skip to content

Commit a4bc92d

Browse files
Update ci.yml
1 parent dd04350 commit a4bc92d

1 file changed

Lines changed: 4 additions & 8 deletions

File tree

.github/workflows/ci.yml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@ on:
44
push:
55
branches:
66
- main
7-
workflow_dispatch:
8-
push:
97
tags:
108
- "*"
9+
workflow_dispatch:
1110

1211
permissions:
1312
contents: read
@@ -24,15 +23,14 @@ jobs:
2423
run: |
2524
set -e
2625
repo="${{ github.repository }}"
27-
workflow_file="${{ github.workflow_ref }}"
28-
# github.workflow_ref looks like: owner/repo/.github/workflows/<file>.yml@ref
29-
wf_path=$(echo "$workflow_file" | sed -E 's#^[^/]+/[^/]+/##' | sed -E 's#@.*$##')
26+
workflow_ref="${{ github.workflow_ref }}"
27+
# workflow_ref looks like: owner/repo/.github/workflows/ci.yml@refs/heads/main
28+
wf_path=$(echo "$workflow_ref" | sed -E 's#^[^/]+/[^/]+/##' | sed -E 's#@.*$##')
3029
3130
echo "Repo: $repo"
3231
echo "Workflow path: $wf_path"
3332
echo "Keeping last 3 runs, deleting older ones..."
3433
35-
# List runs for this workflow file, newest first
3634
ids=$(gh run list --repo "$repo" --workflow "$wf_path" --limit 100 --json databaseId --jq '.[].databaseId')
3735
3836
keep=3
@@ -90,7 +88,6 @@ jobs:
9088
path: Tool/dist/SoccerNetProAnalyzer.exe
9189
retention-days: 3
9290

93-
9491
build-macos:
9592
name: Build on macOS
9693
runs-on: macos-latest
@@ -132,7 +129,6 @@ jobs:
132129
path: Tool/dist/SoccerNetProAnalyzer.app
133130
retention-days: 3
134131

135-
136132
build-linux:
137133
name: Build on Linux
138134
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)