Skip to content

Build container image with Cloud Native Buildpacks in GitHub Actions.

License

Notifications You must be signed in to change notification settings

mamezou-tech/buildpacks-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@mamezou-tech/buildpacks-action

Run action

Build container image with Cloud Native Buildpacks in GitHub Actions.

on: [push]
  build:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v3

    - name: Build image
      uses: mamezou-tech/buildpacks-action@master
      with:
        image: 'foo-app'
        tag: '1.0.0'
        path: 'path/to/foo-app/'
        builder: 'gcr.io/paketo-buildpacks/builder:base'
        env: 'HELLO=WORLD FOO=BAR BAZ'

    - name: Push image

buildpacks/pack v0.29.0 will be executed.

Inputs

  • image : (required) Name of container image.
  • tag : (optional) Tag of container image. Default latest
  • path : (optional) Path to target application, defaults to the current directory.
  • builder : (required) Builder to use.
  • buildpacks : (optional) URLs or Paths to Custom buildpacks, space separated.
  • env : (optional) Environment variables, space separated.
  • env_files : (optional) Files containing build time environment variables, space separated.
  • publish : (optional) Publish the built image (requires docker to be logged in)
  • debug_mode : (optional) Only print the command to be run. Will not build container image

See "Cloud Native Buildpack Documentation · Environment variables" for environment valiables.

Example of building with buildpack

on: [push]
  build:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v3

    - name: Build image
      uses: mamezou-tech/buildpacks-action@master
      with:
        image: 'sample-java-maven-app'
        path: 'samples/apps/java-maven/'
        builder: 'cnbs/sample-builder:alpine'
        buildpacks: 'samples/buildpacks/java-maven samples/buildpacks/hello-processes/ cnbs/sample-package:hello-universe'
        publish: true