Skip to content

Commit

Permalink
jbang v0.81.2
Browse files Browse the repository at this point in the history
  • Loading branch information
jreleaserbot authored and runner committed Oct 7, 2021
1 parent 352b691 commit f1db1b5
Show file tree
Hide file tree
Showing 5 changed files with 97 additions and 0 deletions.
34 changes: 34 additions & 0 deletions v0.81.2/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
FROM adoptopenjdk:11-jdk-hotspot

LABEL "org.opencontainers.image.title"="jbang"
LABEL "org.opencontainers.image.description"="Unleash the power of Java"
LABEL "org.opencontainers.image.url"="https://jbang.dev"
LABEL "org.opencontainers.image.licenses"="MIT"
LABEL "org.opencontainers.image.version"="0.81.2"
LABEL "org.opencontainers.image.revision"="95a715e40c06316b8069555447a99a3a9c78584e"


COPY assembly/* /

RUN jar xf jbang-0.81.2.zip && \
rm jbang-0.81.2.zip && \
mv jbang-* jbang && \
chmod +x jbang/bin/jbang

VOLUME /scripts

ENV PATH="${PATH}:/jbang-0.81.2/bin"

ADD ./entrypoint /bin/entrypoint

ENV SCRIPTS_HOME /scripts
ENV JBANG_VERSION 0.81.2

VOLUME /scripts

ENV PATH="${PATH}:/jbang/bin"

## github action does not allow writing to $HOME thus routing this elsewhere
ENV JBANG_DIR="/jbang/.jbang"

ENTRYPOINT ["entrypoint"]
21 changes: 21 additions & 0 deletions v0.81.2/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2020 Max Rydahl Andersen

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
21 changes: 21 additions & 0 deletions v0.81.2/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: 'Java Scripting w/jbang'
description: 'Run Java as scripts with https://jbang.dev from your GitHub repo'
branding:
icon: hash
color: red
inputs:
jbangargs:
description: 'Arguments for jbang'
required: false
script:
description: 'Script file to run'
required: true
scriptargs:
description: 'arguments to pass on to the script'
required: false
trust:
description: "if present will be added to trust before running jbang"
required: false
runs:
using: 'docker'
image: 'docker://ghcr.io/jbangdev/jbang-action:0.81.2'
Binary file added v0.81.2/assembly/jbang-0.81.2.zip
Binary file not shown.
21 changes: 21 additions & 0 deletions v0.81.2/entrypoint
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/usr/bin/env bash

# In OpenShift, containers are run as a random high number uid
# that doesn't exist in /etc/passwd
if [ `id -u` -ge 500 ] || [ -z "${CURRENT_UID}" ]; then

cat << EOF > /tmp/passwd
root:x:0:0:root:/root:/bin/bash
jbang:x:`id -u`:`id -g`:,,,:/scripts:/bin/bash
EOF

cat /tmp/passwd > /etc/passwd
rm /tmp/passwd
fi

if [[ ! -z "$INPUT_TRUST" ]]; then
jbang trust add $INPUT_TRUST
fi

echo jbang $INPUT_JBANGARGS $INPUT_SCRIPT $INPUT_ARGS "${@}"
exec jbang $INPUT_JBANGARGS $INPUT_SCRIPT $INPUT_SCRIPTARGS "${@}"

0 comments on commit f1db1b5

Please sign in to comment.