From c64eab18531fe3fca827cab6a7fc48feebf61b46 Mon Sep 17 00:00:00 2001 From: psreejeevitha <98149605+psreejeevitha@users.noreply.github.com> Date: Fri, 20 Sep 2024 10:18:23 +0530 Subject: [PATCH 1/4] Create main.yml --- .github/workflows/main.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 00000000..2d9e3380 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,22 @@ +name: Maven CI/CD + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build_and_test: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Set up JDK 14 + uses: actions/setup-java@v1 + with: + java-version: 14 + + - name: Build project with Maven + run: mvn -B package --file pom.xml From ccb3a7d071f4cb6bed48ee9cedc2c79630044cea Mon Sep 17 00:00:00 2001 From: psreejeevitha <98149605+psreejeevitha@users.noreply.github.com> Date: Fri, 20 Sep 2024 10:23:05 +0530 Subject: [PATCH 2/4] Update main.yml --- .github/workflows/main.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2d9e3380..d50be71f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -2,9 +2,9 @@ name: Maven CI/CD on: push: - branches: [ master ] - pull_request: - branches: [ master ] + branches: [ psreejeevitha-patch-1 ] + # pull_request: + # branches: [ master ] jobs: build_and_test: From e7fb97c37d1811da17d223916e3942c5d72ea8a9 Mon Sep 17 00:00:00 2001 From: psreejeevitha <98149605+psreejeevitha@users.noreply.github.com> Date: Fri, 20 Sep 2024 15:31:37 +0530 Subject: [PATCH 3/4] Update main.yml --- .github/workflows/main.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d50be71f..186849c0 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -20,3 +20,9 @@ jobs: - name: Build project with Maven run: mvn -B package --file pom.xml + - name: Archive production artifacts + uses: actions/upload-artifact@v4 + with: + name: copy_main_folder + path: | + main From 2fb4ca0dbbf273c3cb3d1e74d09fc8be92a3d186 Mon Sep 17 00:00:00 2001 From: psreejeevitha <98149605+psreejeevitha@users.noreply.github.com> Date: Fri, 20 Sep 2024 15:33:06 +0530 Subject: [PATCH 4/4] Update main.yml --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 186849c0..e6236726 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -25,4 +25,4 @@ jobs: with: name: copy_main_folder path: | - main + */main