GithubHelp home page GithubHelp logo

mathieusoysal / jib-container-publish.yml Goto Github PK

View Code? Open in Web Editor NEW
10.0 2.0 5.0 68 KB

GitHub Actions for your Java project to build container with jib and publish it to GitHub Packages.

License: GNU General Public License v3.0

java java-to-github-packages github-actions docker jib maven actions hacktoberfest

jib-container-publish.yml's Introduction

Build container with JIB and publish it to GitHub Packages

GitHub action to build container with jib and publish it to GitHub Packages.

Requirements

  • Your project need to use Maven

Usage

The workflow, usually declared in .github/workflows/jib-publish.yml, looks like:

name: JIB container publish

on:
  release:
    types: [created]

jobs:
  publish:
    runs-on: ubuntu-latest
    steps:
      - name: JIB container build and publish
        uses: MathieuSoysal/[email protected]
        with:
          PASSWORD: ${{ secrets.GITHUB_TOKEN }}

You need to choice a registry other than GitHub Package ?

You can change the REGISTRY,USERNAME,PASSWORD to publish in the registry of your choice:

name: JIB container publish

on:
  release:
    types: [created]

jobs:
  publish:
    runs-on: ubuntu-latest
    steps:
      - name: JIB container build and publish
        uses: MathieuSoysal/[email protected]
        with:
          # Use docker.io for Docker Hub if empty
          REGISTRY: ghcr.io
          # github.repository as <your-account>/<your-repo>
          IMAGE_NAME: ${{ github.repository }}
          # Tag name of the image to publish
          tag-name: ${{ github.event.release.tag_name }}
          # Username to login to registry
          USERNAME: ${{ github.actor }}
          # Password to login to registry
          PASSWORD: ${{ secrets.GITHUB_TOKEN }}
          java-version: 17

Multi-Module Maven Projects

If you have a multi-module Maven project you can specify the main module containing the main class using the parameter module and the main class using the parameter main-class.

License

The Dockerfile and associated scripts and documentation in this project are released under the GPL-3.0 License.

jib-container-publish.yml's People

Contributors

dependabot[bot] avatar mathieusoysal avatar psub avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

jib-container-publish.yml's Issues

Add automated tests

Current problem

Currently, we don't have any automated tests inside the project. This is a little problematic for the contribution, a contributor can't test if the added feature works correctly.

Solution to fix this

It's probably possible to use https://github.com/nektos/act inside a CI, to execute this JavaDoc publisher with a empty project.

Add compatibility for Gradle

Introduction

Currently the JIB-container-publish doesn't support java project with Gradle

Feature

Add some features to support a Gradle project too.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.