Skip to content

Commit 3234322

Browse files
committed
ci: use env
Signed-off-by: nabim777 <nabinalemagar019@gmail.com>
1 parent c0e782f commit 3234322

1 file changed

Lines changed: 11 additions & 28 deletions

File tree

.github/workflows/appstore.yml

Lines changed: 11 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -9,26 +9,7 @@
99

1010
name: Upgrade Testing
1111

12-
on:
13-
pull_request:
14-
# workflow_call:
15-
# inputs:
16-
# nextcloud_versions:
17-
# required: false
18-
# type: string
19-
# default: "31 32"
20-
# php_versions:
21-
# required: false
22-
# type: string
23-
# default: "8.2 8.3"
24-
# previous_app_version:
25-
# required: false
26-
# type: string
27-
# default: "2.9.2"
28-
# upgrade_app_version:
29-
# required: false
30-
# type: string
31-
# default: "2.10.0"
12+
on: [pull_request]
3213

3314
jobs:
3415
create-matrix:
@@ -40,8 +21,8 @@ jobs:
4021
- name: Create matrix
4122
id: create-matrix
4223
env:
43-
NEXTCLOUD_VERSIONS: ${{ inputs.nextcloud_versions }}
44-
PHP_VERSIONS: ${{ inputs.php_versions }}
24+
NEXTCLOUD_VERSIONS: "29 30"
25+
PHP_VERSIONS: "8.2 8.3"
4526
run: |
4627
MATRIX=$(./.github/scripts/generate-matrix.sh)
4728
echo "matrix={\"include\": [$MATRIX]}" >> $GITHUB_OUTPUT
@@ -58,6 +39,8 @@ jobs:
5839

5940
env:
6041
DJANGO_SETTINGS_MODULE: nextcloudappstore.settings.development
42+
PREVIOUS_APP_VERSION: 2.9.2
43+
UPGRADE_APP_VERSION: 2.10.0
6144
services:
6245
database-mysql:
6346
image: ghcr.io/nextcloud/continuous-integration-mariadb-10.5:latest
@@ -75,13 +58,13 @@ jobs:
7558
with:
7659
path: integration_openproject
7760
fetch-tags: true
78-
ref: v${{ inputs.upgrade_app_version }}
61+
ref: v${{ env.UPGRADE_APP_VERSION }}
7962

8063
- name: Checkout
8164
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8
8265
with:
8366
repository: nextcloud/activity
84-
ref: stable${{ matrix.nextcloud_version }}
67+
ref: ${{ matrix.nextcloudVersion }}
8568
path: activity
8669

8770
- name: Setup NodeJS
@@ -95,7 +78,7 @@ jobs:
9578
- name: Setup PHP
9679
uses: shivammathur/setup-php@a4e22b60bbb9c1021113f2860347b0759f66fe5d
9780
with:
98-
php-version: ${{ matrix.php_version }}
81+
php-version: ${{ format('{0}.{1}', matrix.phpVersionMajor,matrix.phpVersionMinor) }}
9982
extensions: mbstring, intl, mysql, gd
10083
ini-values: post_max_size=256M, max_execution_time=180
10184
coverage: xdebug
@@ -106,7 +89,7 @@ jobs:
10689
export DEBIAN_FRONTEND=noninteractive
10790
echo "###### installing nextcloud"
10891
mkdir ~/html
109-
git clone https://github.com/nextcloud/server.git --recursive --depth 1 -b stable${{ matrix.nextcloud_version }} ~/html/nextcloud
92+
git clone https://github.com/nextcloud/server.git --recursive --depth 1 -b ${{ matrix.nextcloudVersion }} ~/html/nextcloud
11093
cd ~/html/nextcloud
11194
git submodule update --init
11295
mkdir -p data
@@ -181,7 +164,7 @@ jobs:
181164
- name: Register and publish integration_openproject apps
182165
env:
183166
APP_ID: integration_openproject
184-
APP_VERSION: ${{ inputs.previous_app_version }}
167+
APP_VERSION: ${{ env.PREVIOUS_APP_VERSION }}
185168
SIGNATURE: signature1
186169
run: |
187170
wget https://raw.githubusercontent.com/nextcloud/integration_openproject/${{github.head_ref}}/.github/scripts/self-hosted-app-store.sh
@@ -212,7 +195,7 @@ jobs:
212195
- name: Register and publish next release of the app
213196
env:
214197
APP_ID: integration_openproject
215-
APP_VERSION: ${{ inputs.upgrade_app_version }}
198+
APP_VERSION: ${{ env.UPGRADE_APP_VERSION }}
216199
SIGNATURE: signature2
217200
run: |
218201
bash ./self-hosted-app-store.sh

0 commit comments

Comments
 (0)