diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml new file mode 100644 index 0000000..c35ef08 --- /dev/null +++ b/.github/workflows/publish.yaml @@ -0,0 +1,48 @@ +name: CI + +on: + push: + branches: + - main + +jobs: + publish: + if: github.event_name != 'pull_request' + runs-on: ubuntu-22.04-16core + env: + architecture: "amd64" + GRADLE_OPTS: "-Xmx6g -Dorg.gradle.parallel=true -Dorg.gradle.workers.max=4" + + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Set up JDK 21 + uses: actions/setup-java@v3 + with: + java-version: 21 + distribution: temurin + + - name: Set up QEMU for Docker + uses: docker/setup-qemu-action@v3 + with: + platforms: arm64 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + with: + platforms: linux/amd64,linux/arm64 + + - name: Check Dockerfile syntax + run: | + docker run --rm -i hadolint/hadolint < docker/Dockerfile + + - name: Login to Docker Hub for self hosted + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKER_USER_RW }} + password: ${{ secrets.DOCKER_PAT_RW }} + + - name: Build and Publish Docker Image + run: | + ./gradlew -Pdocker-platform=linux/amd64,linux/arm64 distDocker -x checkLicense