chore: update workflows from templates
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
This commit is contained in:
25
.github/workflows/appstore-build-publish.yml
vendored
25
.github/workflows/appstore-build-publish.yml
vendored
@@ -2,6 +2,9 @@
|
|||||||
#
|
#
|
||||||
# https://github.com/nextcloud/.github
|
# https://github.com/nextcloud/.github
|
||||||
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
|
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
|
||||||
|
#
|
||||||
|
# SPDX-FileCopyrightText: 2021-2024 Nextcloud GmbH and Nextcloud contributors
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
name: Build and publish app release
|
name: Build and publish app release
|
||||||
|
|
||||||
@@ -29,7 +32,7 @@ jobs:
|
|||||||
echo "APP_VERSION=${GITHUB_REF##*/}" >> $GITHUB_ENV
|
echo "APP_VERSION=${GITHUB_REF##*/}" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
||||||
with:
|
with:
|
||||||
path: ${{ env.APP_NAME }}
|
path: ${{ env.APP_NAME }}
|
||||||
|
|
||||||
@@ -41,7 +44,7 @@ jobs:
|
|||||||
expression: "//info//dependencies//nextcloud/@min-version"
|
expression: "//info//dependencies//nextcloud/@min-version"
|
||||||
|
|
||||||
- name: Read package.json node and npm engines version
|
- name: Read package.json node and npm engines version
|
||||||
uses: skjnldsv/read-package-engines-version-actions@8205673bab74a63eb9b8093402fd9e0e018663a1 # v2.2
|
uses: skjnldsv/read-package-engines-version-actions@06d6baf7d8f41934ab630e97d9e6c0bc9c9ac5e4 # v3
|
||||||
id: versions
|
id: versions
|
||||||
# Continue if no package.json
|
# Continue if no package.json
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
@@ -60,7 +63,7 @@ jobs:
|
|||||||
- name: Set up npm ${{ steps.versions.outputs.npmVersion }}
|
- name: Set up npm ${{ steps.versions.outputs.npmVersion }}
|
||||||
# Skip if no package.json
|
# Skip if no package.json
|
||||||
if: ${{ steps.versions.outputs.npmVersion }}
|
if: ${{ steps.versions.outputs.npmVersion }}
|
||||||
run: npm i -g npm@"${{ steps.versions.outputs.npmVersion }}"
|
run: npm i -g 'npm@${{ steps.versions.outputs.npmVersion }}'
|
||||||
|
|
||||||
- name: Get php version
|
- name: Get php version
|
||||||
id: php-versions
|
id: php-versions
|
||||||
@@ -69,7 +72,7 @@ jobs:
|
|||||||
filename: ${{ env.APP_NAME }}/appinfo/info.xml
|
filename: ${{ env.APP_NAME }}/appinfo/info.xml
|
||||||
|
|
||||||
- name: Set up php ${{ steps.php-versions.outputs.php-min }}
|
- name: Set up php ${{ steps.php-versions.outputs.php-min }}
|
||||||
uses: shivammathur/setup-php@a4e22b60bbb9c1021113f2860347b0759f66fe5d # v2
|
uses: shivammathur/setup-php@2e947f1f6932d141d076ca441d0e1e881775e95b # v2.31.0
|
||||||
with:
|
with:
|
||||||
php-version: ${{ steps.php-versions.outputs.php-min }}
|
php-version: ${{ steps.php-versions.outputs.php-min }}
|
||||||
coverage: none
|
coverage: none
|
||||||
@@ -78,7 +81,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Check composer.json
|
- name: Check composer.json
|
||||||
id: check_composer
|
id: check_composer
|
||||||
uses: andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6 # v2
|
uses: andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6 # v3.0.0
|
||||||
with:
|
with:
|
||||||
files: "${{ env.APP_NAME }}/composer.json"
|
files: "${{ env.APP_NAME }}/composer.json"
|
||||||
|
|
||||||
@@ -92,15 +95,15 @@ jobs:
|
|||||||
# Skip if no package.json
|
# Skip if no package.json
|
||||||
if: ${{ steps.versions.outputs.nodeVersion }}
|
if: ${{ steps.versions.outputs.nodeVersion }}
|
||||||
env:
|
env:
|
||||||
CYPRESS_INSTALL_BINARY: 0
|
NODE_ENV: production
|
||||||
run: |
|
run: |
|
||||||
cd ${{ env.APP_NAME }}
|
cd ${{ env.APP_NAME }}
|
||||||
npm ci
|
npm ci
|
||||||
npm run build
|
npm run build --if-present
|
||||||
|
|
||||||
- name: Check Krankerl config
|
- name: Check Krankerl config
|
||||||
id: krankerl
|
id: krankerl
|
||||||
uses: andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6 # v2
|
uses: andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6 # v3.0.0
|
||||||
with:
|
with:
|
||||||
files: ${{ env.APP_NAME }}/krankerl.toml
|
files: ${{ env.APP_NAME }}/krankerl.toml
|
||||||
|
|
||||||
@@ -126,12 +129,12 @@ jobs:
|
|||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
id: server-checkout
|
id: server-checkout
|
||||||
run: |
|
run: |
|
||||||
NCVERSION=${{ fromJSON(steps.appinfo.outputs.result).nextcloud.min-version }}
|
NCVERSION='${{ fromJSON(steps.appinfo.outputs.result).nextcloud.min-version }}'
|
||||||
wget --quiet https://download.nextcloud.com/server/releases/latest-$NCVERSION.zip
|
wget --quiet https://download.nextcloud.com/server/releases/latest-$NCVERSION.zip
|
||||||
unzip latest-$NCVERSION.zip
|
unzip latest-$NCVERSION.zip
|
||||||
|
|
||||||
- name: Checkout server master fallback
|
- name: Checkout server master fallback
|
||||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
||||||
if: ${{ steps.server-checkout.outcome != 'success' }}
|
if: ${{ steps.server-checkout.outcome != 'success' }}
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
@@ -145,7 +148,7 @@ jobs:
|
|||||||
tar -xvf ${{ env.APP_NAME }}.tar.gz
|
tar -xvf ${{ env.APP_NAME }}.tar.gz
|
||||||
cd ../../../
|
cd ../../../
|
||||||
# Setting up keys
|
# Setting up keys
|
||||||
echo "${{ secrets.APP_PRIVATE_KEY }}" > ${{ env.APP_NAME }}.key
|
echo '${{ secrets.APP_PRIVATE_KEY }}' > ${{ env.APP_NAME }}.key
|
||||||
wget --quiet "https://github.com/nextcloud/app-certificate-requests/raw/master/${{ env.APP_NAME }}/${{ env.APP_NAME }}.crt"
|
wget --quiet "https://github.com/nextcloud/app-certificate-requests/raw/master/${{ env.APP_NAME }}/${{ env.APP_NAME }}.crt"
|
||||||
# Signing
|
# Signing
|
||||||
php nextcloud/occ integrity:sign-app --privateKey=../${{ env.APP_NAME }}.key --certificate=../${{ env.APP_NAME }}.crt --path=../${{ env.APP_NAME }}/build/artifacts/${{ env.APP_NAME }}
|
php nextcloud/occ integrity:sign-app --privateKey=../${{ env.APP_NAME }}.key --certificate=../${{ env.APP_NAME }}.crt --path=../${{ env.APP_NAME }}/build/artifacts/${{ env.APP_NAME }}
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ jobs:
|
|||||||
pull-requests: write
|
pull-requests: write
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
# Github actions bot approve
|
# GitHub actions bot approve
|
||||||
- uses: hmarr/auto-approve-action@b40d6c9ed2fa10c9a2749eca7eb004418a705501 # v2
|
- uses: hmarr/auto-approve-action@b40d6c9ed2fa10c9a2749eca7eb004418a705501 # v2
|
||||||
with:
|
with:
|
||||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|||||||
5
.github/workflows/fixup.yml
vendored
5
.github/workflows/fixup.yml
vendored
@@ -2,6 +2,9 @@
|
|||||||
#
|
#
|
||||||
# https://github.com/nextcloud/.github
|
# https://github.com/nextcloud/.github
|
||||||
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
|
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
|
||||||
|
#
|
||||||
|
# SPDX-FileCopyrightText: 2021-2024 Nextcloud GmbH and Nextcloud contributors
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
name: Block fixup and squash commits
|
name: Block fixup and squash commits
|
||||||
|
|
||||||
@@ -28,6 +31,6 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Run check
|
- name: Run check
|
||||||
uses: skjnldsv/block-fixup-merge-action@42d26e1b536ce61e5cf467d65fb76caf4aa85acf # v1
|
uses: skjnldsv/block-fixup-merge-action@c138ea99e45e186567b64cf065ce90f7158c236a # v2
|
||||||
with:
|
with:
|
||||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|||||||
5
.github/workflows/lint-info-xml.yml
vendored
5
.github/workflows/lint-info-xml.yml
vendored
@@ -2,6 +2,9 @@
|
|||||||
#
|
#
|
||||||
# https://github.com/nextcloud/.github
|
# https://github.com/nextcloud/.github
|
||||||
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
|
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
|
||||||
|
#
|
||||||
|
# SPDX-FileCopyrightText: 2021-2024 Nextcloud GmbH and Nextcloud contributors
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
name: Lint info.xml
|
name: Lint info.xml
|
||||||
|
|
||||||
@@ -21,7 +24,7 @@ jobs:
|
|||||||
name: info.xml lint
|
name: info.xml lint
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
||||||
|
|
||||||
- name: Download schema
|
- name: Download schema
|
||||||
run: wget https://raw.githubusercontent.com/nextcloud/appstore/master/nextcloudappstore/api/v1/release/info.xsd
|
run: wget https://raw.githubusercontent.com/nextcloud/appstore/master/nextcloudappstore/api/v1/release/info.xsd
|
||||||
|
|||||||
7
.github/workflows/lint-php-cs.yml
vendored
7
.github/workflows/lint-php-cs.yml
vendored
@@ -2,6 +2,9 @@
|
|||||||
#
|
#
|
||||||
# https://github.com/nextcloud/.github
|
# https://github.com/nextcloud/.github
|
||||||
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
|
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
|
||||||
|
#
|
||||||
|
# SPDX-FileCopyrightText: 2021-2024 Nextcloud GmbH and Nextcloud contributors
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
name: Lint php-cs
|
name: Lint php-cs
|
||||||
|
|
||||||
@@ -22,14 +25,14 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
||||||
|
|
||||||
- name: Get php version
|
- name: Get php version
|
||||||
id: versions
|
id: versions
|
||||||
uses: icewind1991/nextcloud-version-matrix@58becf3b4bb6dc6cef677b15e2fd8e7d48c0908f # v1.3.1
|
uses: icewind1991/nextcloud-version-matrix@58becf3b4bb6dc6cef677b15e2fd8e7d48c0908f # v1.3.1
|
||||||
|
|
||||||
- name: Set up php${{ steps.versions.outputs.php-available }}
|
- name: Set up php${{ steps.versions.outputs.php-available }}
|
||||||
uses: shivammathur/setup-php@a4e22b60bbb9c1021113f2860347b0759f66fe5d # v2
|
uses: shivammathur/setup-php@2e947f1f6932d141d076ca441d0e1e881775e95b # v2.31.0
|
||||||
with:
|
with:
|
||||||
php-version: ${{ steps.versions.outputs.php-available }}
|
php-version: ${{ steps.versions.outputs.php-available }}
|
||||||
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite
|
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite
|
||||||
|
|||||||
9
.github/workflows/lint-php.yml
vendored
9
.github/workflows/lint-php.yml
vendored
@@ -2,6 +2,9 @@
|
|||||||
#
|
#
|
||||||
# https://github.com/nextcloud/.github
|
# https://github.com/nextcloud/.github
|
||||||
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
|
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
|
||||||
|
#
|
||||||
|
# SPDX-FileCopyrightText: 2021-2024 Nextcloud GmbH and Nextcloud contributors
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
name: Lint php
|
name: Lint php
|
||||||
|
|
||||||
@@ -21,7 +24,7 @@ jobs:
|
|||||||
php-versions: ${{ steps.versions.outputs.php-versions }}
|
php-versions: ${{ steps.versions.outputs.php-versions }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout app
|
- name: Checkout app
|
||||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
||||||
- name: Get version matrix
|
- name: Get version matrix
|
||||||
id: versions
|
id: versions
|
||||||
uses: icewind1991/nextcloud-version-matrix@58becf3b4bb6dc6cef677b15e2fd8e7d48c0908f # v1.0.0
|
uses: icewind1991/nextcloud-version-matrix@58becf3b4bb6dc6cef677b15e2fd8e7d48c0908f # v1.0.0
|
||||||
@@ -37,10 +40,10 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
||||||
|
|
||||||
- name: Set up php ${{ matrix.php-versions }}
|
- name: Set up php ${{ matrix.php-versions }}
|
||||||
uses: shivammathur/setup-php@a4e22b60bbb9c1021113f2860347b0759f66fe5d # v2
|
uses: shivammathur/setup-php@2e947f1f6932d141d076ca441d0e1e881775e95b # v2.31.0
|
||||||
with:
|
with:
|
||||||
php-version: ${{ matrix.php-versions }}
|
php-version: ${{ matrix.php-versions }}
|
||||||
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite
|
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite
|
||||||
|
|||||||
Reference in New Issue
Block a user