Skip to content
Docker image and Github Action to run jbang scripts
Java Dockerfile
Use this GitHub Action with your project

Add this Action to an existing workflow or create a new one.

View on Marketplace
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github/workflows
Dockerfile
README.md
action.yml

README.md

J'Bang Container for Docker and Github Action

This container intended for quick and easily run java based scripts with jbang.

Can be used directly with docker or as a GitHub Action

Source

Container/Docker usage

Docker Repository on Quay.io nodesource/node

Using dockerhub images:

docker run -v `pwd`:/ws --workdir=/ws maxandersen/jbang-action helloworld.java

Using quay.io images:

docker run -v `pwd`:/ws --workdir=/ws quay.io/maxandersen/jbang-action helloworld.java

Github Action

Inputs

Outputs

Example usage

Here it is assumed you have a jbang script called createissue.java in the root of your project.

on: [push]

jobs:
	jbang:
	runs-on: ubuntu-latest
	name: A job to run jbang
	steps:
	- name: checkout
		uses: actions/checkout@v1
	- uses: actions/cache@v1
		with:
		path: /root/.jbang
		key: ${{ runner.os }}-jbang-${{ hashFiles('*.java') }}
		restore-keys: |
			${{ runner.os }}-jbang-
	- name: jbang
		uses: maxandersen/jbang-action@v0.16.2
		with:
		script: createissue.java
		args: "my world"
		env:
		JBANG_REPO: /root/.jbang/repository
		GITHUB_TOKEN: ${{ secrets.ISSUE_GITHUB_TOKEN }}
You can’t perform that action at this time.