Skip to content

Commit

Permalink
Update entrypoints
Browse files Browse the repository at this point in the history
  • Loading branch information
abstractj committed Jun 17, 2024
1 parent 5d99d30 commit 18255be
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
3 changes: 1 addition & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
FROM openjdk:17-slim

# Add Loki-dist.zip to the Docker image
ADD target/*.tar.gz /opt/loki
RUN apt-get update && apt-get install -y curl unzip

COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
Expand Down
6 changes: 3 additions & 3 deletions action.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 'loki-sync-jira-to-github'
description: 'Synchronize Jira issues to GitHub repositories'
name: 'Loki Action'
description: 'A GitHub Action synchronize Jira issues to GitHub repositories'
inputs:
from-jira:
description: 'Flag to indicate from Jira'
Expand All @@ -9,7 +9,7 @@ inputs:
required: true
runs:
using: 'docker'
image: 'quay.io/aurora-labs-42/loki-action:latest'
image: 'Dockerfile'
args:
- ${{ inputs.from-jira }}
- ${{ inputs.to-repo }}
8 changes: 8 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,12 @@ set -e
FROM_JIRA=$1
TO_REPO=$2

# Get the latest tag from the GitHub releases
LATEST_TAG=$(curl --silent "https://api.github.com/repos/aurora-labs-42/loki/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')

# Download the JAR file
curl -L -o loki-dist.zip https://github.com/aurora-labs-42/loki/releases/download/${LATEST_TAG}/loki-${LATEST_TAG}-dist.zip
unzip loki-dist.zip

# Assuming the JAR file is named loki.jar inside the unzipped directory
java -jar quarkus-run.jar --from-jira --to-repo=${TO_REPO}

0 comments on commit 18255be

Please sign in to comment.