Skip to content

Commit

Permalink
Add docker action to publish to docker hub
Browse files Browse the repository at this point in the history
Signed-off-by: Gabriel-Trintinalia <[email protected]>
  • Loading branch information
Gabriel-Trintinalia committed Aug 13, 2024
1 parent 4d10ca0 commit cd95631
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit cd95631

Please sign in to comment.