forked from nyashaushe/Color-Tech
-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (49 loc) · 1.86 KB
/
update-strapi.yml
File metadata and controls
59 lines (49 loc) · 1.86 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: Update Strapi Version
on:
workflow_dispatch:
inputs:
version:
description: 'Strapi version to update to (e.g., 5.17.0)'
required: true
type: string
create_pr:
description: 'Create a pull request with the changes'
required: true
type: boolean
default: true
jobs:
update-strapi:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
cache: 'npm'
cache-dependency-path: strapi-backend/package-lock.json
- name: Install dependencies
run: cd strapi-backend && npm ci
- name: Update Strapi version
run: cd strapi-backend && node scripts/update-strapi-version.js ${{ github.event.inputs.version }}
- name: Check for changes
id: git-check
run: |
git diff --exit-code || echo "changes=true" >> $GITHUB_OUTPUT
- name: Create Pull Request
if: steps.git-check.outputs.changes == 'true' && github.event.inputs.create_pr == 'true'
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: 'chore: update Strapi to version ${{ github.event.inputs.version }}'
title: 'Update Strapi to version ${{ github.event.inputs.version }}'
body: |
This PR updates Strapi to version ${{ github.event.inputs.version }}.
### Changes
- Updated all @strapi/* dependencies to version ${{ github.event.inputs.version }}
### Testing
- [ ] Verify that the Strapi backend starts correctly
- [ ] Verify that all existing functionality works as expected
branch: update-strapi-${{ github.event.inputs.version }}
base: develop
labels: dependencies,strapi