From ec48ac765c1200758b1e564a8adc45b4531b3dfa Mon Sep 17 00:00:00 2001 From: Bohdan Chupika Date: Fri, 22 Sep 2023 13:27:02 +0300 Subject: [PATCH] make task autoapprove (#820) --- .github/workflows/ci.yml | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ead0ef36..6787a6b6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,6 +1,6 @@ name: Java CI -on: [push, pull_request] +on: [push, pull_request_target] jobs: build: @@ -8,11 +8,22 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Set up JDK 11 + with: + ref: ${{github.event.pull_request.head.ref}} + repository: ${{github.event.pull_request.head.repo.full_name}} + - name: Set up JDK 17 uses: actions/setup-java@v2 with: - java-version: '11' + java-version: '17' distribution: 'adopt' cache: maven - name: Build with Maven run: mvn --batch-mode --update-snapshots verify + - uses: mate-academy/auto-approve-action@v2 + if: ${{ github.event.pull_request && success() }} + with: + github-token: ${{ github.token }} + - uses: mate-academy/auto-reject-action@v2 + if: ${{ github.event.pull_request && failure() }} + with: + github-token: ${{ github.token }}