Github Actions 빌드 에러 : Build with Gradle

hwarye·2023년 3월 22일
0

Trouble Shooting

목록 보기
6/11

🟡 빌드 오류난 gradle.yml

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle

name: Java CI with Gradle

on:
  push:
    branches: [ "fullDev" ]
  pull_request:
    branches: [ "fullDev" ]

permissions:
  contents: read

jobs:
  build:

    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v3
    - name: Set up JDK 11
      uses: actions/setup-java@v3
      with:
        java-version: '11'
        distribution: 'temurin'
    - name: Build with Gradle
      uses: gradle/gradle-build-action@67421db6bd0bf253fb4bd25b31ebb98943c375e1
      with:
        arguments: build

✨ 해결 방법

  1. gradle init
  2. gradle 버전 명시

+ 추가
나중에 gradle init을 빼고 작동하는 걸 확인했다..... gradle init은 해결 방법이 아니였던 것으로,,!

🟡 빌드 성공한 gradle.yml


# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle

name: Java CI with Gradle

on:
  push:
    branches: [ "fullDev" ]
  pull_request:
    branches: [ "fullDev" ]

permissions:
  contents: read

jobs:
  build:

    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v3
    - name: Set up JDK 11
      uses: actions/setup-java@v3
      with:
        java-version: '11'
        distribution: 'temurin'
    - name: init with Gradle
      uses: gradle/gradle-build-action@v2
    - run: gradle init
    - name: Build with Gradle
      uses: gradle/gradle-build-action@67421db6bd0bf253fb4bd25b31ebb98943c375e1
      with:
        gradle-version: 7.6.1
        arguments: build
        

cf)
https://velog.io/@cws0718/Github-Actions-Error

profile
례코드

0개의 댓글