diff --git a/.github/dependabot-auto-merge.yml b/.github/dependabot-auto-merge.yml deleted file mode 100644 index e0c89e7..0000000 --- a/.github/dependabot-auto-merge.yml +++ /dev/null @@ -1,3 +0,0 @@ -- match: - dependency_type: "all" - update_type: "all" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 68b9423..64058d2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,18 +9,6 @@ on: workflow_dispatch: -permissions: - actions: read - checks: write - contents: none - deployments: none - issues: none - packages: none - pull-requests: write - repository-projects: none - security-events: write - statuses: write - jobs: build-client: diff --git a/.github/workflows/dependabot-auto-merge.yml b/.github/workflows/dependabot-auto-merge.yml index 32bdabf..3770d8b 100644 --- a/.github/workflows/dependabot-auto-merge.yml +++ b/.github/workflows/dependabot-auto-merge.yml @@ -1,29 +1,24 @@ -name: dependabot-auto-merge +name: auto-merge -on: - pull_request_target: +on: pull_request + +permissions: + contents: write + pull-requests: write jobs: auto-merge: runs-on: ubuntu-latest - if: github.actor == 'dependabot[bot]' + if: github.event.pull_request.draft == false steps: - uses: actions/checkout@v5 - - uses: ahmadnassri/action-dependabot-auto-merge@v2 - with: - github-token: ${{ secrets.PERSONAL_TOKEN_FOR_GITHUB_ACTIONS }} - config: .github/dependabot-auto-merge.yml - - - name: Slack Notification (not success) - uses: lazy-actions/slatify@master - if: "! success()" - continue-on-error: true - with: - job_name: '*auto-merge*' - type: ${{ job.status }} - icon_emoji: ":octocat:" - url: ${{ secrets.SLACK_WEBHOOK }} - token: ${{ secrets.PERSONAL_TOKEN_FOR_GITHUB_ACTIONS }} + - name: Enable auto-merge for Pull Request + run: | + gh pr review --approve "$PR_URL" + gh pr merge --auto --squash "$PR_URL" + env: + PR_URL: ${{github.event.pull_request.html_url}} + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}