-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add docker action to publish to docker hub
Signed-off-by: Gabriel-Trintinalia <[email protected]>
- Loading branch information
1 parent
4d10ca0
commit cd95631
Showing
1 changed file
with
48 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
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 |