autoApproveSync.yml 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. # synced from @nextcloud/android-config
  2. # SPDX-FileCopyrightText: 2022-2024 Nextcloud GmbH and Nextcloud contributors
  3. # SPDX-FileCopyrightText: 2023 Álvaro Brey <alvaro@alvarobrey.com>
  4. # SPDX-License-Identifier: GPL-3.0-or-later
  5. name: Auto approve sync
  6. on:
  7. pull_request_target:
  8. branches:
  9. - master
  10. - main
  11. types:
  12. - opened
  13. - reopened
  14. - synchronize
  15. - labeled
  16. concurrency:
  17. group: sync-approve-${{ github.head_ref || github.run_id }}
  18. cancel-in-progress: true
  19. permissions:
  20. pull-requests: write
  21. jobs:
  22. auto-approve:
  23. name: Auto approve sync
  24. runs-on: ubuntu-latest
  25. if: ${{ contains(github.event.pull_request.labels.*.name, 'sync') && github.actor == 'nextcloud-android-bot' }}
  26. steps:
  27. - name: Disabled on forks
  28. if: ${{ github.event.pull_request.head.repo.full_name != github.repository }}
  29. run: |
  30. echo 'Can not approve PRs from forks'
  31. exit 1
  32. - uses: hmarr/auto-approve-action@f0939ea97e9205ef24d872e76833fa908a770363 # v4.0.0
  33. with:
  34. github-token: "${{ secrets.GITHUB_TOKEN }}"