From b454e129f775223ee45d2d7d6fe9137db1c651ee Mon Sep 17 00:00:00 2001 From: ByeongGyu Jeon Date: Tue, 25 Mar 2025 10:31:25 +0900 Subject: [PATCH 1/3] =?UTF-8?q?Chore:=20=EB=A9=94=EC=9D=B8=20PR=20?= =?UTF-8?q?=EC=8B=9C=20=EC=BD=94=EB=93=9C=20=EC=A0=95=EC=A0=81=20=EA=B2=80?= =?UTF-8?q?=EC=82=AC,=20=ED=85=8C=EC=8A=A4=ED=8A=B8=20=EC=8B=A4=ED=96=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 44 +++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000..6a6eeebe --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,44 @@ +name: log4u-build +on: + push: + branches: + - dev # dev 브랜치 push + pull_request: + branches: + - main # main pr + types: [ opened, synchronize, reopened ] +jobs: + build: + name: Build and analyze + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis + - name: Set up JDK 21 + uses: actions/setup-java@v4 + with: + java-version: 21 + distribution: 'zulu' # Alternative distribution options are available + - name: Cache Gradle packages + uses: actions/cache@v4 + with: + path: ~/.gradle/caches + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} + restore-keys: ${{ runner.os }}-gradle + - name: Cache SonarCloud packages + uses: actions/cache@v4 + with: + path: ~/.sonar/cache + key: ${{ runner.os }}-sonar + restore-keys: ${{ runner.os }}-sonar + - name: Build and analyze + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + DB_URL: ${{ secrets.DB_URL }} # Database URL + DB_USERNAME: ${{ secrets.DB_USERNAME }} # Database username + DB_PASSWORD: ${{ secrets.DB_PASSWORD }} # Database password + run: | + chmod +x ./gradlew + ./gradlew build jacocoTestReport sonar --info \ No newline at end of file From f421a2ff18fa752e756595cdbb5b3361213305d0 Mon Sep 17 00:00:00 2001 From: ByeongGyu Jeon Date: Tue, 25 Mar 2025 10:31:55 +0900 Subject: [PATCH 2/3] =?UTF-8?q?Chore:=20=EB=8D=B0=EC=9D=BC=EB=A6=AC=20?= =?UTF-8?q?=EC=95=84=EC=B9=B4=EC=9D=B4=EB=B9=99=20yml=20=ED=8C=8C=EC=9D=BC?= =?UTF-8?q?=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/daily-archive.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/daily-archive.yml diff --git a/.github/workflows/daily-archive.yml b/.github/workflows/daily-archive.yml new file mode 100644 index 00000000..a201e782 --- /dev/null +++ b/.github/workflows/daily-archive.yml @@ -0,0 +1,28 @@ +name: Archive dev branch daily + +on: + schedule: + - cron: "59 14 * * *" # 한국 시간(KST) 23:59 (UTC+14:59) + workflow_dispatch: # 수동 실행 가능 + +jobs: + archive: + name: Archive dev branch + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 # 모든 브랜치 가져오기 + + - name: Set archive branch name + id: date + run: echo "BRANCH_NAME=archive-$(date +'%Y-%m-%d')" >> $GITHUB_ENV + + - name: Create new archive branch + run: | + git checkout dev + git pull origin dev + git checkout -b ${{ env.BRANCH_NAME }} + git push origin ${{ env.BRANCH_NAME }} \ No newline at end of file From 7f8bd7f76292fb8f3e7b403b5c0de41273e2d0e5 Mon Sep 17 00:00:00 2001 From: ByeongGyu Jeon Date: Tue, 25 Mar 2025 10:32:36 +0900 Subject: [PATCH 3/3] =?UTF-8?q?Chore:=20Dev=20=EB=B8=8C=EB=9E=9C=EC=B9=98?= =?UTF-8?q?=20push=20=EC=98=B5=EC=85=98=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6a6eeebe..ca8c9427 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,8 +1,8 @@ name: log4u-build on: - push: - branches: - - dev # dev 브랜치 push +# push: +# branches: +# - dev # dev 브랜치 push pull_request: branches: - main # main pr