-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into feat/Dockerfile/switch-cmd-to-entrypoint
Signed-off-by: Joda Stößer <[email protected]>
- Loading branch information
Showing
58 changed files
with
5,738 additions
and
2,628 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: cargo | ||
directory: "/" | ||
schedule: | ||
interval: weekly | ||
day: tuesday | ||
time: "02:00" | ||
open-pull-requests-limit: 10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,181 @@ | ||
# This workflow is adjusted compared to the one from the template to setup rust+cross | ||
|
||
name: Build and publish app release | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
env: | ||
PHP_VERSION: 8.1 | ||
|
||
jobs: | ||
build_and_publish: | ||
runs-on: ubuntu-latest | ||
|
||
# Only allowed to be run on nextcloud-releases repositories | ||
if: ${{ github.repository_owner == 'nextcloud-releases' }} | ||
|
||
steps: | ||
### Adjustments start ### | ||
- name: musl-tools | ||
run: | | ||
sudo apt-get install musl-tools | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
override: true | ||
target: x86_64-unknown-linux-musl | ||
- name: cross | ||
run: | | ||
cargo install cross --locked | ||
### Adjustments end ### | ||
|
||
- name: Check actor permission | ||
uses: skjnldsv/check-actor-permission@e591dbfe838300c007028e1219ca82cc26e8d7c5 # v2.1 | ||
with: | ||
require: write | ||
|
||
- name: Set app env | ||
run: | | ||
# Split and keep last | ||
echo "APP_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV | ||
echo "APP_VERSION=${GITHUB_REF##*/}" >> $GITHUB_ENV | ||
- name: Checkout | ||
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 | ||
with: | ||
path: ${{ env.APP_NAME }} | ||
|
||
- name: Get appinfo data | ||
id: appinfo | ||
uses: skjnldsv/xpath-action@7e6a7c379d0e9abc8acaef43df403ab4fc4f770c # master | ||
with: | ||
filename: ${{ env.APP_NAME }}/appinfo/info.xml | ||
expression: "//info//dependencies//nextcloud/@min-version" | ||
|
||
- name: Read package.json node and npm engines version | ||
uses: skjnldsv/read-package-engines-version-actions@0ce2ed60f6df073a62a77c0a4958dd0fc68e32e7 # v2.1 | ||
id: versions | ||
# Continue if no package.json | ||
continue-on-error: true | ||
with: | ||
path: ${{ env.APP_NAME }} | ||
fallbackNode: "^16" | ||
fallbackNpm: "^7" | ||
|
||
- name: Set up node ${{ steps.versions.outputs.nodeVersion }} | ||
# Skip if no package.json | ||
if: ${{ steps.versions.outputs.nodeVersion }} | ||
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3 | ||
with: | ||
node-version: ${{ steps.versions.outputs.nodeVersion }} | ||
|
||
- name: Set up npm ${{ steps.versions.outputs.npmVersion }} | ||
# Skip if no package.json | ||
if: ${{ steps.versions.outputs.npmVersion }} | ||
run: npm i -g npm@"${{ steps.versions.outputs.npmVersion }}" | ||
|
||
- name: Set up php ${{ env.PHP_VERSION }} | ||
uses: shivammathur/setup-php@c5fc0d8281aba02c7fda07d3a70cc5371548067d # v2 | ||
with: | ||
php-version: ${{ env.PHP_VERSION }} | ||
coverage: none | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Check composer.json | ||
id: check_composer | ||
uses: andstor/file-existence-action@20b4d2e596410855db8f9ca21e96fbe18e12930b # v2 | ||
with: | ||
files: "${{ env.APP_NAME }}/composer.json" | ||
|
||
- name: Install composer dependencies | ||
if: steps.check_composer.outputs.files_exists == 'true' | ||
run: | | ||
cd ${{ env.APP_NAME }} | ||
composer install --no-dev | ||
- name: Build ${{ env.APP_NAME }} | ||
# Skip if no package.json | ||
if: ${{ steps.versions.outputs.nodeVersion }} | ||
run: | | ||
cd ${{ env.APP_NAME }} | ||
npm ci | ||
npm run build | ||
- name: Check Krankerl config | ||
id: krankerl | ||
uses: andstor/file-existence-action@20b4d2e596410855db8f9ca21e96fbe18e12930b # v2 | ||
with: | ||
files: ${{ env.APP_NAME }}/krankerl.toml | ||
|
||
- name: Install Krankerl | ||
if: steps.krankerl.outputs.files_exists == 'true' | ||
run: | | ||
wget https://github.com/ChristophWurst/krankerl/releases/download/v0.14.0/krankerl_0.14.0_amd64.deb | ||
sudo dpkg -i krankerl_0.14.0_amd64.deb | ||
- name: Package ${{ env.APP_NAME }} ${{ env.APP_VERSION }} with krankerl | ||
if: steps.krankerl.outputs.files_exists == 'true' | ||
run: | | ||
cd ${{ env.APP_NAME }} | ||
krankerl package | ||
- name: Package ${{ env.APP_NAME }} ${{ env.APP_VERSION }} with makefile | ||
if: steps.krankerl.outputs.files_exists != 'true' | ||
run: | | ||
cd ${{ env.APP_NAME }} | ||
make appstore | ||
- name: Checkout server ${{ fromJSON(steps.appinfo.outputs.result).nextcloud.min-version }} | ||
continue-on-error: true | ||
id: server-checkout | ||
run: | | ||
NCVERSION=${{ fromJSON(steps.appinfo.outputs.result).nextcloud.min-version }} | ||
wget --quiet https://download.nextcloud.com/server/releases/latest-$NCVERSION.zip | ||
unzip latest-$NCVERSION.zip | ||
- name: Checkout server master fallback | ||
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 | ||
if: ${{ steps.server-checkout.outcome != 'success' }} | ||
with: | ||
submodules: true | ||
repository: nextcloud/server | ||
path: nextcloud | ||
|
||
- name: Sign app | ||
run: | | ||
# Extracting release | ||
cd ${{ env.APP_NAME }}/build/artifacts | ||
tar -xvf ${{ env.APP_NAME }}.tar.gz | ||
cd ../../../ | ||
# Setting up keys | ||
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" | ||
# 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 }} | ||
# Rebuilding archive | ||
cd ${{ env.APP_NAME }}/build/artifacts | ||
tar -zcvf ${{ env.APP_NAME }}.tar.gz ${{ env.APP_NAME }} | ||
- name: Attach tarball to github release | ||
uses: svenstaro/upload-release-action@2b9d2847a97b04d02ad5c3df2d3a27baa97ce689 # v2 | ||
id: attach_to_release | ||
with: | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
file: ${{ env.APP_NAME }}/build/artifacts/${{ env.APP_NAME }}.tar.gz | ||
asset_name: ${{ env.APP_NAME }}-${{ env.APP_VERSION }}.tar.gz | ||
tag: ${{ github.ref }} | ||
overwrite: true | ||
|
||
- name: Upload app to Nextcloud appstore | ||
uses: nextcloud-releases/nextcloud-appstore-push-action@a011fe619bcf6e77ddebc96f9908e1af4071b9c1 # v1 | ||
with: | ||
app_name: ${{ env.APP_NAME }} | ||
appstore_token: ${{ secrets.APPSTORE_TOKEN }} | ||
download_url: ${{ steps.attach_to_release.outputs.browser_download_url }} | ||
app_private_key: ${{ secrets.APP_PRIVATE_KEY }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# This workflow is provided via the organization template repository | ||
# | ||
# https://github.com/nextcloud/.github | ||
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization | ||
|
||
name: Lint info.xml | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
- master | ||
- stable* | ||
|
||
permissions: | ||
contents: read | ||
|
||
concurrency: | ||
group: lint-info-xml-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
xml-linters: | ||
runs-on: ubuntu-latest | ||
|
||
name: info.xml lint | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 | ||
|
||
- name: Download schema | ||
run: wget https://raw.githubusercontent.com/nextcloud/appstore/master/nextcloudappstore/api/v1/release/info.xsd | ||
|
||
- name: Lint info.xml | ||
uses: ChristophWurst/xmllint-action@39155a91429af431d65fafc21fa52ba5c4f5cb71 # v1.1 | ||
with: | ||
xml-file: ./appinfo/info.xml | ||
xml-schema-file: ./info.xsd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# This workflow is provided via the organization template repository | ||
# | ||
# https://github.com/nextcloud/.github | ||
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization | ||
|
||
name: Lint php-cs | ||
|
||
on: pull_request | ||
|
||
permissions: | ||
contents: read | ||
|
||
concurrency: | ||
group: lint-php-cs-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
|
||
name: php-cs | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 | ||
|
||
- name: Set up php | ||
uses: shivammathur/setup-php@c5fc0d8281aba02c7fda07d3a70cc5371548067d # v2 | ||
with: | ||
php-version: 8.1 | ||
coverage: none | ||
ini-file: development | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Install dependencies | ||
run: composer i | ||
|
||
- name: Lint | ||
run: composer run cs:check || ( echo 'Please run `composer run cs:fix` to format your code' && exit 1 ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
# This workflow is provided via the organization template repository | ||
# | ||
# https://github.com/nextcloud/.github | ||
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization | ||
|
||
name: Lint php | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
- master | ||
- stable* | ||
|
||
permissions: | ||
contents: read | ||
|
||
concurrency: | ||
group: lint-php-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
php-lint: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
php-versions: [ "8.0", "8.1", "8.2" ] | ||
|
||
name: php-lint | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 | ||
|
||
- name: Set up php ${{ matrix.php-versions }} | ||
uses: shivammathur/setup-php@c5fc0d8281aba02c7fda07d3a70cc5371548067d # v2 | ||
with: | ||
php-version: ${{ matrix.php-versions }} | ||
coverage: none | ||
ini-file: development | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Lint | ||
run: composer run lint | ||
|
||
summary: | ||
permissions: | ||
contents: none | ||
runs-on: ubuntu-latest | ||
needs: php-lint | ||
|
||
if: always() | ||
|
||
name: php-lint-summary | ||
|
||
steps: | ||
- name: Summary status | ||
run: if ${{ needs.php-lint.result != 'success' && needs.php-lint.result != 'skipped' }}; then exit 1; fi |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.