summaryrefslogtreecommitdiffstats
path: root/.github
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2023-07-24 11:27:12 +0200
committerJoas Schilling <coding@schilljs.com>2023-07-24 14:37:01 +0200
commit3b3c3f81d41ceefe2b79419ae7ae71f1b6b34948 (patch)
treed94302ee3fc1d691fdeae153f22f4a3ddb0540e2 /.github
parentb78d3355251bd279efe70f37abda377fb1807eed (diff)
feat(CI): Create a GitHub issue on nextcloud/ocp update error
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/update-nextcloud-ocp.yml30
1 files changed, 27 insertions, 3 deletions
diff --git a/.github/workflows/update-nextcloud-ocp.yml b/.github/workflows/update-nextcloud-ocp.yml
index e40744d3f..19d0fb69d 100644
--- a/.github/workflows/update-nextcloud-ocp.yml
+++ b/.github/workflows/update-nextcloud-ocp.yml
@@ -22,13 +22,13 @@ jobs:
name: update-nextcloud-ocp-${{ matrix.branches }}
steps:
- - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
+ - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
with:
ref: ${{ matrix.branches }}
submodules: true
- name: Set up php8.1
- uses: shivammathur/setup-php@c5fc0d8281aba02c7fda07d3a70cc5371548067d # v2
+ uses: shivammathur/setup-php@4bd44f22a98a19e0950cbad5f31095157cc9621b # v2
with:
php-version: 8.1
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
@@ -37,17 +37,41 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ - name: Read codeowners
+ id: codeowners
+ run: |
+ grep '/appinfo/info.xml' .github/CODEOWNERS | awk '{ print "codeowners="$2 }' >> $GITHUB_OUTPUT
+ continue-on-error: true
+
- name: Composer install
run: composer install
- name: Composer update nextcloud/ocp
+ id: update_branch
if: matrix.branches != 'main'
run: composer require --dev nextcloud/ocp:dev-${{ matrix.branches }}
+ - name: Raise on issue on failure
+ uses: dacbd/create-issue-action@ba4d1c45cccf9c483f2720cefb40e437f0ee6f7d # v1.2.1
+ if: ${{ failure() && steps.update_branch.conclusion == 'failure' }}
+ with:
+ token: ${{ secrets.GITHUB_TOKEN }}
+ title: Failed to update nextcloud/ocp package on branch ${{ matrix.branches }}
+ body: Please check the output of the GitHub action and manually resolve the issues<br>${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}<br>${{ steps.codeowners.outputs.codeowners }}
+
- name: Composer update nextcloud/ocp
+ id: update_main
if: matrix.branches == 'main'
run: composer require --dev nextcloud/ocp:dev-master
+ - name: Raise on issue on failure
+ uses: dacbd/create-issue-action@ba4d1c45cccf9c483f2720cefb40e437f0ee6f7d # v1.2.1
+ if: ${{ failure() && steps.update_main.conclusion == 'failure' }}
+ with:
+ token: ${{ secrets.GITHUB_TOKEN }}
+ title: Failed to update nextcloud/ocp package on branch ${{ matrix.branches }}
+ body: Please check the output of the GitHub action and manually resolve the issues<br>${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}<br>${{ steps.codeowners.outputs.codeowners }}
+
- name: Reset checkout 3rdparty
run: |
git clean -f 3rdparty
@@ -67,7 +91,7 @@ jobs:
continue-on-error: true
- name: Create Pull Request
- uses: peter-evans/create-pull-request@284f54f989303d2699d373481a0cfa13ad5a6666 # v3
+ uses: peter-evans/create-pull-request@153407881ec5c347639a548ade7d8ad1d6740e38 # v3
with:
token: ${{ secrets.COMMAND_BOT_PAT }}
commit-message: "chore(dev-deps): Bump nextcloud/ocp package"