Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/updater.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCôme Chilliet <come.chilliet@nextcloud.com>2022-07-25 13:07:14 +0300
committerCôme Chilliet <come.chilliet@nextcloud.com>2022-07-25 13:07:14 +0300
commitdf280387ef3a1c4e91e2efebd70d2c555808edb9 (patch)
treeb307c1f5d8c8cbde19ee87c6a83e4b39a9bf23cb /.github
parentbd6a4114864faec390044e8bb4f4505db73bfbce (diff)
Add workflows and scripts, bump symfony/console, require nextcloud/coding-standard
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/command-rebase.yml51
-rw-r--r--.github/workflows/lint-php-cs.yml39
-rw-r--r--.github/workflows/lint-php.yml53
3 files changed, 143 insertions, 0 deletions
diff --git a/.github/workflows/command-rebase.yml b/.github/workflows/command-rebase.yml
new file mode 100644
index 0000000..78fcf5d
--- /dev/null
+++ b/.github/workflows/command-rebase.yml
@@ -0,0 +1,51 @@
+# 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: Rebase command
+
+on:
+ issue_comment:
+ types: created
+
+permissions:
+ contents: read
+
+jobs:
+ rebase:
+ runs-on: ubuntu-latest
+ permissions:
+ contents: none
+
+ # On pull requests and if the comment starts with `/rebase`
+ if: github.event.issue.pull_request != '' && startsWith(github.event.comment.body, '/rebase')
+
+ steps:
+ - name: Add reaction on start
+ uses: peter-evans/create-or-update-comment@v2
+ with:
+ token: ${{ secrets.COMMAND_BOT_PAT }}
+ repository: ${{ github.event.repository.full_name }}
+ comment-id: ${{ github.event.comment.id }}
+ reaction-type: "+1"
+
+ - name: Checkout the latest code
+ uses: actions/checkout@v3
+ with:
+ fetch-depth: 0
+ token: ${{ secrets.COMMAND_BOT_PAT }}
+
+ - name: Automatic Rebase
+ uses: cirrus-actions/rebase@1.7
+ env:
+ GITHUB_TOKEN: ${{ secrets.COMMAND_BOT_PAT }}
+
+ - name: Add reaction on failure
+ uses: peter-evans/create-or-update-comment@v2
+ if: failure()
+ with:
+ token: ${{ secrets.COMMAND_BOT_PAT }}
+ repository: ${{ github.event.repository.full_name }}
+ comment-id: ${{ github.event.comment.id }}
+ reaction-type: "-1"
diff --git a/.github/workflows/lint-php-cs.yml b/.github/workflows/lint-php-cs.yml
new file mode 100644
index 0000000..eb236b7
--- /dev/null
+++ b/.github/workflows/lint-php-cs.yml
@@ -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
+
+on:
+ pull_request:
+ push:
+ branches:
+ - main
+ - master
+ - stable*
+
+permissions:
+ contents: read
+
+jobs:
+ lint:
+ runs-on: ubuntu-latest
+
+ name: php-cs
+
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v3
+
+ - name: Set up php ${{ matrix.php-versions }}
+ uses: shivammathur/setup-php@v2
+ with:
+ php-version: "7.4"
+ coverage: none
+
+ - 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 )
diff --git a/.github/workflows/lint-php.yml b/.github/workflows/lint-php.yml
new file mode 100644
index 0000000..d089d1b
--- /dev/null
+++ b/.github/workflows/lint-php.yml
@@ -0,0 +1,53 @@
+# 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
+
+on:
+ pull_request:
+ push:
+ branches:
+ - main
+ - master
+ - stable*
+
+permissions:
+ contents: read
+
+jobs:
+ php-lint:
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ php-versions: ["7.4", "8.0", "8.1"]
+
+ name: php-lint
+
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v3
+
+ - name: Set up php ${{ matrix.php-versions }}
+ uses: shivammathur/setup-php@v2
+ with:
+ php-version: ${{ matrix.php-versions }}
+ coverage: none
+
+ - 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