2023-01-17 05:37:57 +03:00
|
|
|
# synced from @nextcloud/android-config
|
2024-02-29 22:23:51 +03:00
|
|
|
|
|
|
|
# SPDX-FileCopyrightText: 2022-2024 Nextcloud GmbH and Nextcloud contributors
|
|
|
|
# SPDX-FileCopyrightText: 2023 Álvaro Brey <alvaro@alvarobrey.com>
|
2024-03-30 05:15:29 +03:00
|
|
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
2024-02-29 22:23:51 +03:00
|
|
|
|
2023-02-13 05:44:59 +03:00
|
|
|
name: Auto approve sync
|
2023-01-11 17:32:46 +03:00
|
|
|
on:
|
|
|
|
pull_request_target:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
- main
|
2023-02-13 05:44:59 +03:00
|
|
|
types:
|
|
|
|
- opened
|
|
|
|
- reopened
|
|
|
|
- synchronize
|
|
|
|
- labeled
|
|
|
|
|
|
|
|
concurrency:
|
|
|
|
group: sync-approve-${{ github.head_ref || github.run_id }}
|
|
|
|
cancel-in-progress: true
|
2023-01-11 17:32:46 +03:00
|
|
|
|
|
|
|
permissions:
|
|
|
|
pull-requests: write
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
auto-approve:
|
2023-02-13 05:44:59 +03:00
|
|
|
name: Auto approve sync
|
2023-01-11 17:32:46 +03:00
|
|
|
runs-on: ubuntu-latest
|
2023-02-13 05:44:59 +03:00
|
|
|
if: ${{ contains(github.event.pull_request.labels.*.name, 'sync') && github.actor == 'nextcloud-android-bot' }}
|
2023-01-11 17:32:46 +03:00
|
|
|
steps:
|
2024-09-10 11:26:01 +03:00
|
|
|
- name: Disabled on forks
|
|
|
|
if: ${{ github.event.pull_request.head.repo.full_name != github.repository }}
|
|
|
|
run: |
|
|
|
|
echo 'Can not approve PRs from forks'
|
|
|
|
exit 1
|
2024-09-11 05:39:15 +03:00
|
|
|
|
2024-02-04 11:56:33 +03:00
|
|
|
- uses: hmarr/auto-approve-action@f0939ea97e9205ef24d872e76833fa908a770363 # v4.0.0
|
2023-01-11 17:32:46 +03:00
|
|
|
with:
|
|
|
|
github-token: "${{ secrets.GITHUB_TOKEN }}"
|