Newer
Older
thu-learn-downloader-optimized / .github / workflows / merge.yaml
@github-actions[bot] github-actions[bot] on 5 Feb 2024 917 bytes ci: sync with template repository
name: Merge

on:
  pull_request:

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}

jobs:
  check:
    name: Check
    runs-on: ubuntu-latest
    steps:
      - name: Check
        uses: liblaf/template/.github/actions/check@main

  merge:
    name: Merge
    permissions:
      contents: write
      pull-requests: write
    if: github.event.pull_request.user.login == 'dependabot[bot]' ||
      github.event.pull_request.user.login == 'pre-commit-ci[bot]'
    runs-on: ubuntu-latest
    steps:
      - name: Enable Auto-Merge (Squash)
        run: gh pr merge ${{ github.event.pull_request.html_url }} --auto --squash
        env:
          GH_TOKEN: ${{ github.token }}
      - name: Enable Merge-on-green
        run: |
          gh pr edit ${{ github.event.pull_request.html_url }} --add-label "automerge: exact"
        env:
          GH_TOKEN: ${{ github.token }}
        continue-on-error: true