Skip to content

Chore: Update local compose (#632) #118

Chore: Update local compose (#632)

Chore: Update local compose (#632) #118

Workflow file for this run

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@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
token: ${{ github.token }}
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'zulu'
cache: 'maven'
- name: Build a jar
id: build
run: |
./mvnw -B -ntp versions:set -DnewVersion=$GITHUB_SHA
./mvnw -V -B -ntp clean package -Pprod -DskipTests
export VERSION=$(./mvnw -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec)
echo "version=${VERSION}" >> $GITHUB_OUTPUT
- name: Upload jar
uses: actions/upload-artifact@v4
with:
name: kafbat-ui-${{ steps.build.outputs.version }}
path: api/target/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