action, переделанный для alt https://github.com/project-stacker/stacker-build-push-action
Go to file
Petu Eusebiu 47dff6bd92 Update README
Signed-off-by: Petu Eusebiu <peusebiu@cisco.com>
2022-04-08 14:07:29 +03:00
.github/workflows Added stacker publish 2022-04-06 19:00:54 +03:00
dist Added stacker publish 2022-04-06 19:00:54 +03:00
src Added stacker publish 2022-04-06 19:00:54 +03:00
test Added stacker publish 2022-04-06 19:00:54 +03:00
.gitignore Prepare for migrating to project-stacker/stacker-build-action 2022-03-31 17:24:32 +03:00
action.yml Added stacker publish 2022-04-06 19:00:54 +03:00
LICENSE Initial commit 2022-03-25 13:26:33 +02:00
package-lock.json Prepare for migrating to project-stacker/stacker-build-action 2022-03-31 17:24:32 +03:00
package.json Added stacker publish 2022-04-06 19:00:54 +03:00
README.md Update README 2022-04-08 14:07:29 +03:00
tsconfig.json Prepare for migrating to project-stacker/stacker-build-action 2022-03-31 17:24:32 +03:00

stacker-build-push-action

ci

stacker build action builds OCI container images via a declarative yaml format.

stacker only works on Linux

For more information about stacker tool see: https://github.com/project-stacker/stacker

Action Inputs

Input Name Description Default
stackerfile the yaml file to be built as an OCI image, example: stacker.yaml stacker.yaml
layer-type output layer type (supported values: tar, squashfs), ca be both separated by whitespace tar
substitutes variable substitution in stackerfile, see stacker.yaml doc None
url remote OCI registry + repo name eg: docker://ghcr.io/project-stacker/ None
tags one or more tags to give the new image, separated by whitespace None
username used to login to registry None
password used to login to registry None
skip-tls used with unsecure (http) registries false

Build only example:

- name: Run stacker-build
  uses: project-stacker/stacker-build-push-action@main
  with:
    stackerfile: 'test/stacker.yaml'
    substitutes: 'SUB1=VAR1 SUB2=VAR2 SUB3=VAR3'
    layer-type: 'tar squashfs'

Publish url is built according to the next logic:

input.url + stacker.yaml container name + : + input.tag

Build and push example to ghcr.io:

- name: Run stacker-build
  uses: project-stacker/stacker-build-push-action@main
  with:
    stackerfile: 'test/stacker.yaml'
    substitutes: 'SUB1=VAR1 SUB2=VAR2 SUB3=VAR3'
    layer-type: 'tar squashfs'
    tags: ${{ github.event.release.tag_name }} latest
    url: docker://ghcr.io/${{ github.repository }}
    username: ${{ github.actor }}
    password: ${{ secrets.GITHUB_TOKEN }}

The above action will build test/stacker.yaml and push it to

  1. docker://ghcr.io/project-stacker/stacker/test:latest
  2. docker://ghcr.io/project-stacker/stacker/test:${{ github.event.release.tag_name }}

Build and push example to localhost:

- name: Run stacker-build
  uses: project-stacker/stacker-build-push-action@main
  with:
    stackerfile: 'test/stacker.yaml'
    substitutes: 'SUB1=VAR1 SUB2=VAR2 SUB3=VAR3'
    layer-type: 'tar squashfs'
    url: docker://localhost:5000
    skip-tls: true
    tags: test

The above action will build test/stacker.yaml and push it to

  1. docker://localhost:5000/test:test