Skip to content

Commit 296677e

Browse files
committed
Update engine download workflow: trigger on push, run only once
- Changed from workflow_dispatch to push trigger - Added check to skip if test-engine/ already exists - Workflow runs automatically on push but only downloads once
1 parent 53cfd9f commit 296677e

File tree

2 files changed

+20
-11
lines changed

2 files changed

+20
-11
lines changed

.github/workflows/download-engine-for-testing.yml

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
name: Download Spring Engine for Local Testing
22

33
on:
4-
workflow_dispatch:
5-
inputs:
6-
branch:
7-
description: 'Branch to push engine to'
8-
required: true
9-
default: 'claude/springboard-rmlui-conversion-011CUooEurKLbWKUu8vygDUw'
4+
push:
5+
branches:
6+
- 'claude/springboard-rmlui-conversion-011CUooEurKLbWKUu8vygDUw'
107

118
jobs:
129
download-and-commit-engine:
@@ -15,16 +12,26 @@ jobs:
1512
steps:
1613
- name: Checkout repository
1714
uses: actions/checkout@v4
18-
with:
19-
ref: ${{ github.event.inputs.branch }}
20-
token: ${{ secrets.GITHUB_TOKEN }}
15+
16+
- name: Check if engine already exists
17+
id: check_engine
18+
run: |
19+
if [ -d "test-engine" ]; then
20+
echo "exists=true" >> $GITHUB_OUTPUT
21+
echo "✓ Engine already exists, skipping download"
22+
else
23+
echo "exists=false" >> $GITHUB_OUTPUT
24+
echo "Engine not found, will download"
25+
fi
2126
2227
- name: Install dependencies
28+
if: steps.check_engine.outputs.exists == 'false'
2329
run: |
2430
sudo apt-get update
2531
sudo apt-get install -y wget p7zip-full
2632
2733
- name: Download BAR Engine
34+
if: steps.check_engine.outputs.exists == 'false'
2835
run: |
2936
echo "Downloading BAR Engine 105.1.1-2472-ga5aa45c (supports RmlUi)..."
3037
wget -q "https://github.com/beyond-all-reason/spring/releases/download/spring_bar_%7BBAR105%7D105.1.1-2472-ga5aa45c/spring_bar_.BAR105.105.1.1-2472-ga5aa45c_linux-64-minimal-portable.7z"
@@ -38,6 +45,7 @@ jobs:
3845
ls -la test-engine/ | head -20
3946
4047
- name: Commit and push engine
48+
if: steps.check_engine.outputs.exists == 'false'
4149
run: |
4250
git config user.name "github-actions[bot]"
4351
git config user.email "github-actions[bot]@users.noreply.github.com"
@@ -51,6 +59,6 @@ locally before running in CI. It can be removed once testing is complete.
5159

5260
Engine: BAR 105.1.1-2472-ga5aa45c (with RmlUi support)"
5361

54-
git push origin ${{ github.event.inputs.branch }}
62+
git push
5563

56-
echo "✓ Engine committed and pushed to ${{ github.event.inputs.branch }}"
64+
echo "✓ Engine committed and pushed"

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ env/
99

1010
# don't track local (dev) file
1111
*.local
12+
*.7z

0 commit comments

Comments
 (0)