Skip to content

Commit c71b89b

Browse files
committed
chore: adjust workflow
1 parent dab5eca commit c71b89b

File tree

1 file changed

+40
-31
lines changed

1 file changed

+40
-31
lines changed

.github/workflows/buddy-bot.yml

Lines changed: 40 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -137,13 +137,13 @@ jobs:
137137
tools: composer
138138
coverage: none
139139

140-
- name: Install dependencies
141-
run: bun install
142-
143140
- name: Install Composer dependencies (if needed)
144141
if: ${{ hashFiles('composer.json') != '' }}
145142
run: composer install --prefer-dist --optimize-autoloader
146143

144+
- name: Install dependencies
145+
run: bun install
146+
147147
- name: Configure Git
148148
run: |
149149
git config --global user.name "github-actions[bot]"
@@ -164,22 +164,21 @@ jobs:
164164
if: ${{ needs.determine-jobs.outputs.run_check == 'true' }}
165165

166166
steps:
167-
- name: Restore workspace
168-
uses: actions/cache/restore@v4
169-
with:
170-
path: |
171-
.
172-
!.git
173-
key: buddy-bot-workspace-${{ github.sha }}
174-
fail-on-cache-miss: true
175-
176167
- name: Checkout repository
177168
uses: actions/checkout@v4
178169
with:
179170
token: ${{ secrets.BUDDY_BOT_TOKEN || secrets.GITHUB_TOKEN }}
180171
fetch-depth: 0
181172
persist-credentials: true
182173

174+
- name: Setup Bun
175+
uses: oven-sh/setup-bun@v2
176+
with:
177+
bun-version: latest
178+
179+
- name: Install dependencies
180+
run: bun install
181+
183182
- name: Configure Git
184183
run: |
185184
git config --global user.name "github-actions[bot]"
@@ -202,7 +201,7 @@ jobs:
202201
echo "🔍 Checking for PRs with rebase checkbox enabled..."
203202
echo "🔧 Environment info:"
204203
echo "Current directory: $(pwd)"
205-
echo "GITHUB_TOKEN set: $([[ -n \"$GITHUB_TOKEN\" ]] && echo \"Yes\" || echo \"No\")"
204+
echo "GITHUB_TOKEN set: $([[ -n "$GITHUB_TOKEN" ]] && echo "Yes" || echo "No")"
206205
echo "Repository: ${{ github.repository }}"
207206
echo "Event: ${{ github.event_name }}"
208207
echo ""
@@ -247,22 +246,33 @@ jobs:
247246
if: ${{ needs.determine-jobs.outputs.run_update == 'true' }}
248247

249248
steps:
250-
- name: Restore workspace
251-
uses: actions/cache/restore@v4
252-
with:
253-
path: |
254-
.
255-
!.git
256-
key: buddy-bot-workspace-${{ github.sha }}
257-
fail-on-cache-miss: true
258-
259249
- name: Checkout repository
260250
uses: actions/checkout@v4
261251
with:
262252
token: ${{ secrets.BUDDY_BOT_TOKEN || secrets.GITHUB_TOKEN }}
263253
fetch-depth: 0
264254
persist-credentials: true
265255

256+
- name: Setup Bun
257+
uses: oven-sh/setup-bun@v2
258+
with:
259+
bun-version: latest
260+
261+
- name: Setup PHP and Composer (if needed)
262+
if: ${{ hashFiles('composer.json') != '' }}
263+
uses: shivammathur/setup-php@v2
264+
with:
265+
php-version: '8.4'
266+
tools: composer
267+
coverage: none
268+
269+
- name: Install Composer dependencies (if needed)
270+
if: ${{ hashFiles('composer.json') != '' }}
271+
run: composer install --prefer-dist --optimize-autoloader
272+
273+
- name: Install dependencies
274+
run: bun install
275+
266276
- name: Configure Git
267277
run: |
268278
git config --global user.name "github-actions[bot]"
@@ -377,20 +387,19 @@ jobs:
377387
if: ${{ needs.determine-jobs.outputs.run_dashboard == 'true' && always() }}
378388

379389
steps:
380-
- name: Restore workspace
381-
uses: actions/cache/restore@v4
382-
with:
383-
path: |
384-
.
385-
!.git
386-
key: buddy-bot-workspace-${{ github.sha }}
387-
fail-on-cache-miss: true
388-
389390
- name: Checkout repository
390391
uses: actions/checkout@v4
391392
with:
392393
token: ${{ secrets.BUDDY_BOT_TOKEN || secrets.GITHUB_TOKEN }}
393394

395+
- name: Setup Bun
396+
uses: oven-sh/setup-bun@v2
397+
with:
398+
bun-version: latest
399+
400+
- name: Install dependencies
401+
run: bun install
402+
394403
- name: Display dashboard configuration
395404
run: |
396405
echo "📊 **Buddy Bot Dashboard Management**"

0 commit comments

Comments
 (0)