From 40b581435d0969cfff4739cf074d76fd78b3f171 Mon Sep 17 00:00:00 2001 From: Kartik Prajapati Date: Mon, 3 Jan 2022 01:49:57 +0530 Subject: [PATCH 1/6] Add build action --- .github/workflows/ant.yml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/ant.yml diff --git a/.github/workflows/ant.yml b/.github/workflows/ant.yml new file mode 100644 index 00000000..6bde0247 --- /dev/null +++ b/.github/workflows/ant.yml @@ -0,0 +1,35 @@ +# This workflow will build a Java project with Ant +# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-ant + +name: Java CI + +on: + workflow_dispatch: + inputs: + sourceBranch: + description: 'The branch from which you want to create the build' + required: true + destBranch: + description: 'The branch on which the build will be pushed' + required: true + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - run: git checkout "${{ github.event.inputs.sourceBranch }}" + - run: git -b checkout "${{ github.event.inputs.destBranch }}" + - name: Set up JDK 11 + uses: actions/setup-java@v2 + with: + java-version: '11' + distribution: 'adopt' + - name: Build with Ant + run: ant build + - name: Push build + - run: git add --force . + - run: git commit -m "Add build" + - run: git push -f --set-upstream origin "${{ github.event.inputs.destBranch }}" From 28696806e24922d8856a69ae8fe354b3b654d151 Mon Sep 17 00:00:00 2001 From: Kartik Prajapati Date: Mon, 3 Jan 2022 01:52:06 +0530 Subject: [PATCH 2/6] Update ant.yml --- .github/workflows/ant.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ant.yml b/.github/workflows/ant.yml index 6bde0247..64f0de98 100644 --- a/.github/workflows/ant.yml +++ b/.github/workflows/ant.yml @@ -29,7 +29,6 @@ jobs: distribution: 'adopt' - name: Build with Ant run: ant build - - name: Push build - run: git add --force . - run: git commit -m "Add build" - run: git push -f --set-upstream origin "${{ github.event.inputs.destBranch }}" From b2ac4ccd94ff9bfc3d60f789fd8f3225cefd2c7f Mon Sep 17 00:00:00 2001 From: Kartik Prajapati Date: Mon, 3 Jan 2022 01:57:41 +0530 Subject: [PATCH 3/6] Update ant.yml --- .github/workflows/ant.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ant.yml b/.github/workflows/ant.yml index 64f0de98..a5bb4d5e 100644 --- a/.github/workflows/ant.yml +++ b/.github/workflows/ant.yml @@ -20,7 +20,8 @@ jobs: steps: - uses: actions/checkout@v2 - - run: git checkout "${{ github.event.inputs.sourceBranch }}" + with: + ref: "${{ github.event.inputs.sourceBranch }}" - run: git -b checkout "${{ github.event.inputs.destBranch }}" - name: Set up JDK 11 uses: actions/setup-java@v2 @@ -29,6 +30,7 @@ jobs: distribution: 'adopt' - name: Build with Ant run: ant build - - run: git add --force . - - run: git commit -m "Add build" - - run: git push -f --set-upstream origin "${{ github.event.inputs.destBranch }}" + - run: | + git add --force . + git commit -m "Add build" + git push -f --set-upstream origin "${{ github.event.inputs.destBranch }}" From 92b778652b308e820f48fd2056cd47b62b7711ad Mon Sep 17 00:00:00 2001 From: Kartik Prajapati Date: Mon, 3 Jan 2022 01:59:27 +0530 Subject: [PATCH 4/6] Update ant.yml --- .github/workflows/ant.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ant.yml b/.github/workflows/ant.yml index a5bb4d5e..ef9e971c 100644 --- a/.github/workflows/ant.yml +++ b/.github/workflows/ant.yml @@ -22,7 +22,7 @@ jobs: - uses: actions/checkout@v2 with: ref: "${{ github.event.inputs.sourceBranch }}" - - run: git -b checkout "${{ github.event.inputs.destBranch }}" + - run: git checkout -b "${{ github.event.inputs.destBranch }}" - name: Set up JDK 11 uses: actions/setup-java@v2 with: From efb9f6c9f57163f7b4bb75483112775bfd527fe0 Mon Sep 17 00:00:00 2001 From: Kartik Prajapati Date: Mon, 3 Jan 2022 02:02:39 +0530 Subject: [PATCH 5/6] Update ant.yml --- .github/workflows/ant.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ant.yml b/.github/workflows/ant.yml index ef9e971c..ae4969a2 100644 --- a/.github/workflows/ant.yml +++ b/.github/workflows/ant.yml @@ -30,6 +30,9 @@ jobs: distribution: 'adopt' - name: Build with Ant run: ant build + - uses: actions/checkout@v2 + with: + ref: "${{ github.event.inputs.destBranch }}" - run: | git add --force . git commit -m "Add build" From 1a1b3dc0b8df7fb467bc077159137e257d20b68b Mon Sep 17 00:00:00 2001 From: Kartik Prajapati Date: Mon, 3 Jan 2022 02:11:02 +0530 Subject: [PATCH 6/6] Update ant.yml --- .github/workflows/ant.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/ant.yml b/.github/workflows/ant.yml index ae4969a2..734d1470 100644 --- a/.github/workflows/ant.yml +++ b/.github/workflows/ant.yml @@ -22,6 +22,7 @@ jobs: - uses: actions/checkout@v2 with: ref: "${{ github.event.inputs.sourceBranch }}" + token: ${{ secrets.GH_BOT_TOKEN }} - run: git checkout -b "${{ github.event.inputs.destBranch }}" - name: Set up JDK 11 uses: actions/setup-java@v2 @@ -30,9 +31,6 @@ jobs: distribution: 'adopt' - name: Build with Ant run: ant build - - uses: actions/checkout@v2 - with: - ref: "${{ github.event.inputs.destBranch }}" - run: | git add --force . git commit -m "Add build"