Skip to content

Commit 5654e48

Browse files
Merge pull request #18729 from nextcloud/chore/noid/openapi-core-workflow
chore: update update-nextcloud-openapi workflow
2 parents a727b30 + d13f606 commit 5654e48

2 files changed

Lines changed: 13 additions & 25 deletions

File tree

.github/workflows/update-nextcloud-openapi.yml

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,11 @@ jobs:
1818
strategy:
1919
fail-fast: false
2020
matrix:
21-
branches: ['main', 'master', 'stable33', 'stable32']
21+
branches:
22+
- ${{ github.event.repository.default_branch }}
23+
- 'stable34'
24+
- 'stable33'
25+
- 'stable32'
2226

2327
name: Update Nextcloud OpenAPI types from core
2428

@@ -29,22 +33,12 @@ jobs:
2933
echo "APP_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV
3034
3135
- name: Checkout server
32-
if: ${{ matrix.branches != 'main' }}
3336
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
3437
with:
3538
persist-credentials: false
3639
submodules: true
3740
repository: nextcloud/server
38-
ref: ${{ matrix.branches }}
39-
40-
- name: Checkout server (Main)
41-
if: ${{ matrix.branches == 'main' }}
42-
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
43-
with:
44-
persist-credentials: false
45-
submodules: true
46-
repository: nextcloud/server
47-
ref: master
41+
ref: ${{ matrix.branches == 'main' && 'master' || matrix.branches }}
4842

4943
- name: Checkout app
5044
id: checkout
@@ -73,15 +67,18 @@ jobs:
7367
if: steps.checkout.outcome == 'success'
7468
run: npm i -g 'npm@${{ steps.versions.outputs.npmVersion }}'
7569

76-
- name: Install dependencies & generate types
70+
- name: Install dependencies
7771
if: steps.checkout.outcome == 'success'
7872
working-directory: apps/${{ env.APP_NAME }}
7973
env:
8074
CYPRESS_INSTALL_BINARY: 0
8175
PUPPETEER_SKIP_DOWNLOAD: true
82-
run: |
83-
npm ci
84-
npm run ts:generate-core-types --if-present
76+
run: npm ci
77+
78+
- name: Generate types
79+
if: steps.checkout.outcome == 'success'
80+
working-directory: apps/${{ env.APP_NAME }}
81+
run: npm run ts:generate-core-types
8582

8683
- name: Create Pull Request
8784
if: steps.checkout.outcome == 'success'

.github/workflows/update-nextcloud-openapi.yml.patch

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)