Skip to content

Isaac #13

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Oct 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 0 additions & 36 deletions .github/workflows/docker-image.yml

This file was deleted.

68 changes: 68 additions & 0 deletions .github/workflows/maven-docker-pipeline.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: Build and Push CI Pipeline

on:
push:
branches:
- '**'
pull_request:
branches:
- master

jobs:
build:
name: Build and Test with Maven
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up JDK 8
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '8'

- name: Build with Maven
run: mvn --batch-mode clean install

- name: Upload Artifact codegen
if: github.ref == 'refs/heads/master' || github.event.pull_request.base.ref == 'master'
uses: actions/upload-artifact@v4
with:
name: javatoavalla-1.0-SNAPSHOT-jar-with-dependencies.jar
path: target/javatoavalla-1.0-SNAPSHOT-jar-with-dependencies.jar
retention-days: 1

docker:
name: Push Docker Image
needs: build
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master' || github.event.pull_request.base.ref == 'master'
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Download artifact
uses: actions/download-artifact@v4
with:
name: javatoavalla-1.0-SNAPSHOT-jar-with-dependencies.jar
path: ./target

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
dockerfile: ./Dockerfile
push: true
tags: isaacmaffeis/javatoavalla:latest

- name: Delete Artifact
uses: GeekyEggo/[email protected]
with:
name: javatoavalla-1.0-SNAPSHOT-jar-with-dependencies.jar
35 changes: 0 additions & 35 deletions .github/workflows/maven.yml

This file was deleted.

12 changes: 10 additions & 2 deletions src/main/java/com/javatoavalla/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,19 @@ public class Main {
* @param args An array of {@code String} arguments passed from the command line.
*/
public static void main(String[] args) {

String asciiart = "\n _ _____ _ _ _ \n"
+ " (_) __ ___ ____ |_ _|__ / \\__ ____ _| | | __ _ \n"
+ " | |/ _` \\ \\ / / _` || |/ _ \\ / _ \\ \\ / / _` | | |/ _` |\n"
+ " | | (_| |\\ V / (_| || | (_) / ___ \\ V / (_| | | | (_| |\n"
+ " _/ |\\__,_| \\_/ \\__,_||_|\\___/_/ \\_\\_/ \\__,_|_|_|\\__,_|\n"
+ "|__/ ";

try {
Main main = new Main();
Options options = getCommandLineOptions();
CommandLine line = main.parseCommandLine(args, options);
log.info("Performing requested operation ...");
log.info(asciiart);
if (line == null || line.hasOption("help") || line.getOptions().length == 0) {
HelpFormatter formatter = new HelpFormatter();
// Do not sort
Expand Down Expand Up @@ -107,7 +115,7 @@ public static Options getCommandLineOptions() {

// clean option
Option clean = Option.builder("clean")
.argName("<boolean>")
.argName("boolean")
.type(String.class)
.hasArg(true)
.desc("Clean the input and the stepFunctionArgs files.")
Expand Down
Loading