Update BothelpCommand.java #41
This file contains hidden or 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 JAR & Container | |
on: | |
push: | |
branches: [ develop, master ] | |
jobs: | |
buildJar: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v2 | |
- uses: joschi/setup-jdk@v2 | |
with: | |
java-version: '17' # The OpenJDK version to make available on the path | |
architecture: 'x64' # defaults to 'x64' | |
- name: Build with Maven | |
run: | | |
mvn package | |
mkdir /home/runner/configs | |
mv /home/runner/work/TS3-Query-Bot/TS3-Query-Bot/target/query_bot-1.0-SNAPSHOT.jar /home/runner/ts3_query_bot.jar | |
mv /home/runner/work/TS3-Query-Bot/TS3-Query-Bot/configs/config.json.example /home/runner/configs/config.json | |
mv /home/runner/work/TS3-Query-Bot/TS3-Query-Bot/configs/*.json /home/runner/configs | |
- name: 'Upload Artifact Nightly' | |
if: ${{ github.ref == 'refs/heads/develop' }} | |
uses: actions/upload-artifact@v2 | |
with: | |
name: ts3-query-bot-nightly | |
path: | | |
/home/runner/ts3_query_bot.jar | |
/home/runner/configs/ | |
retention-days: 30 | |
- name: 'Upload Artifact Stable' | |
if: ${{ github.ref == 'refs/heads/master' }} | |
uses: actions/upload-artifact@v2 | |
with: | |
name: ts3-query-bot-stable | |
path: | | |
/home/runner/ts3_query_bot.jar | |
/home/runner/configs/ | |
retention-days: 30 | |
buildDocker: | |
needs: buildJar | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v2 | |
- name: Get Artifact from BuildJar (Develop) | |
if: ${{ github.ref == 'refs/heads/develop' }} | |
uses: actions/download-artifact@v2 | |
with: | |
name: ts3-query-bot-nightly | |
- name: Get Artifact from BuildJar (Master) | |
if: ${{ github.ref == 'refs/heads/master' }} | |
uses: actions/download-artifact@v2 | |
with: | |
name: ts3-query-bot-stable | |
- name: Login to Dockerhub | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_PASSWORD }} | |
- name: Build and push Docker image (Develop) | |
if: ${{ github.ref == 'refs/heads/develop' }} | |
uses: docker/build-push-action@v2.6.1 | |
with: | |
context: . | |
push: true | |
tags: flopana/ts3-query-bot:develop | |
- name: Build and push Docker image (Master) | |
if: ${{ github.ref == 'refs/heads/master' }} | |
uses: docker/build-push-action@v2.6.1 | |
with: | |
context: . | |
push: true | |
tags: flopana/ts3-query-bot:latest |