2.0.4 #56
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
name: Build and Push | |
on: | |
workflow_dispatch: | |
inputs: | |
name: | |
type: string | |
description: Release Version | |
run-name: ${{ inputs.name }} | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: 17 | |
distribution: 'adopt' | |
- name: Build with Gradle | |
run: ./gradlew assemble | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build and Push Docker Image | |
uses: docker/build-push-action@v3 | |
with: | |
context: . | |
push: true | |
tags: zggis/dobby:${{ inputs.name }} | |
- name: Publish JAR | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Dobby JAR | |
path: build/libs/dobby*.jar |