diff --git a/.github/workflows/ant.yml b/.github/workflows/ant.yml new file mode 100644 index 00000000..734d1470 --- /dev/null +++ b/.github/workflows/ant.yml @@ -0,0 +1,37 @@ +# 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 + 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 + with: + java-version: '11' + distribution: 'adopt' + - name: Build with Ant + run: ant build + - run: | + git add --force . + git commit -m "Add build" + git push -f --set-upstream origin "${{ github.event.inputs.destBranch }}"