Skip to content

Publish to Docker Hub - Intel #10

Publish to Docker Hub - Intel

Publish to Docker Hub - Intel #10

# This is a basic workflow to help you get started with Actions
name: Publish to Docker Hub - Intel
# Controls when the workflow will run
on:
workflow_dispatch:
inputs:
version:
description: 'The FormKiQ version number string to deploy.'
required: true
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Execute Gradle build
run: ./gradlew netty-server:build --info
- name: Build and push Docker image
uses: docker/build-push-action@v5.0.0
env:
formKiQVersion: ${{ github.event.inputs.version }}
with:
platforms: linux/amd64, linux/arm64
context: ./netty-server/build/libs/
file: ./netty-server/build/dockerfile/Dockerfile
push: true
tags: "formkiq/api-server:${{ env.formKiQVersion }}"