From d5ca50b593ccab960ee8a541533432ab670d47a4 Mon Sep 17 00:00:00 2001 From: Maksim Pischulenok Date: Sun, 7 Sep 2025 19:46:42 +0300 Subject: [PATCH] Update github ci --- .github/workflows/ci.yml | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 06d8e40..933f7da 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,22 +1,18 @@ name: CI -on: - pull_request: - push: - branches: - - main +on: [push] jobs: verify: runs-on: ubuntu-latest if: github.event_name == 'pull_request' steps: - - uses: actions/checkout@v4 - - name: Set up JDK 17 - uses: actions/setup-java@v4 + - uses: actions/checkout@v5 + - uses: actions/setup-java@v4 with: - java-version: '17' distribution: 'temurin' + java-version: '21' + cache: 'gradle' - name: Build with Gradle run: ./gradlew build @@ -24,18 +20,20 @@ jobs: runs-on: ubuntu-latest if: github.event_name == 'push' && github.ref == 'refs/heads/main' steps: - - uses: actions/checkout@v4 - - name: Set up JDK 17 - uses: actions/setup-java@v4 + - uses: actions/checkout@v5 + - uses: actions/setup-java@v4 with: - java-version: '17' distribution: 'temurin' + java-version: '21' + cache: 'gradle' - name: Login to GitHub Container Registry uses: docker/login-action@v3 with: registry: ghcr.io - username: ${{ github.repository_owner }} + username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} + - name: Build with Gradle + run: ./gradlew build - name: Build and push Docker image uses: docker/build-push-action@v5 with: