BE: issues/1462 fixed (#1463) #372
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: "Main: Build & deploy" | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: [ "main" ] | |
| permissions: | |
| contents: read | |
| jobs: | |
| jar-build: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| outputs: | |
| version: ${{steps.build.outputs.version}} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@1e31de5234b9f8995739874a8ce0492dc87873e2 # infered from @v4 | |
| with: | |
| ref: ${{ github.event.pull_request.head.sha }} | |
| token: ${{ github.token }} | |
| - name: Set up JDK | |
| uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12 # infered from @v4 | |
| with: | |
| java-version: '21' | |
| distribution: 'zulu' | |
| cache: 'gradle' | |
| - name: Build jar | |
| id: build | |
| run: | | |
| version=${GITHUB_SHA::7} | |
| echo "version=$version" >> $GITHUB_OUTPUT | |
| ./gradlew clean build \ | |
| -x test \ | |
| -Pinclude-frontend=true \ | |
| -Pversion=$version | |
| - name: Upload jar | |
| uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # infered from @v4 | |
| with: | |
| name: kafbat-ui-${{ steps.build.outputs.version }} | |
| path: api/build/libs/api-${{ steps.build.outputs.version }}.jar | |
| retention-days: 1 | |
| docker-build: | |
| needs: jar-build | |
| permissions: | |
| contents: read | |
| uses: ./.github/workflows/docker_build.yml | |
| secrets: inherit | |
| with: | |
| sha: ${{ github.sha }} | |
| version: ${{ needs.jar-build.outputs.version }} | |
| docker-deploy: | |
| needs: [ jar-build, docker-build ] | |
| permissions: | |
| packages: write | |
| id-token: write # Required to authenticate with OIDC for AWS | |
| uses: ./.github/workflows/docker_publish.yml | |
| secrets: inherit | |
| with: | |
| version: ${{ needs.jar-build.outputs.version }} | |
| generic_tag: main |