{"id":20189406,"url":"https://github.com/redhat-actions/s2i-build","last_synced_at":"2025-10-04T19:43:49.154Z","repository":{"id":37469838,"uuid":"313367747","full_name":"redhat-actions/s2i-build","owner":"redhat-actions","description":"Github Action to build an OCI-compatible container image from source code.","archived":false,"fork":false,"pushed_at":"2024-03-16T18:52:39.000Z","size":11012,"stargazers_count":34,"open_issues_count":5,"forks_count":14,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-04T02:02:46.791Z","etag":null,"topics":["action","cloud","containers","docker","openshift","redhat","source-to-image"],"latest_commit_sha":null,"homepage":"https://github.com/marketplace/actions/source-to-image-build","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/redhat-actions.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-11-16T16:50:50.000Z","updated_at":"2025-02-25T11:46:21.000Z","dependencies_parsed_at":"2024-03-16T21:58:12.917Z","dependency_job_id":null,"html_url":"https://github.com/redhat-actions/s2i-build","commit_stats":{"total_commits":59,"total_committers":4,"mean_commits":14.75,"dds":"0.10169491525423724","last_synced_commit":"338d362878e811df2022261728b493e11de1d14c"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redhat-actions%2Fs2i-build","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redhat-actions%2Fs2i-build/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redhat-actions%2Fs2i-build/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redhat-actions%2Fs2i-build/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/redhat-actions","download_url":"https://codeload.github.com/redhat-actions/s2i-build/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248182021,"owners_count":21060891,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["action","cloud","containers","docker","openshift","redhat","source-to-image"],"created_at":"2024-11-14T03:36:46.559Z","updated_at":"2025-10-04T19:43:44.132Z","avatar_url":"https://github.com/redhat-actions.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# s2i-build\n[![CI checks](https://github.com/redhat-actions/s2i-build/workflows/CI%20checks/badge.svg)](https://github.com/redhat-actions/s2i-build/actions?query=workflow%3A%22CI+checks%22)\n[![Verify Build](https://github.com/redhat-actions/s2i-build/workflows/Verify%20Build/badge.svg)](https://github.com/redhat-actions/s2i-build/actions?query=workflow%3A%22Verify+Build%22)\n[![Link checker](https://github.com/redhat-actions/s2i-build/workflows/Link%20checker/badge.svg)](https://github.com/redhat-actions/s2i-build/actions?query=workflow%3A%22Link+checker%22)\n\u003cbr\u003e\u003c/br\u003e\n[![tag badge](https://img.shields.io/github/v/tag/redhat-actions/s2i-build)](https://github.com/redhat-actions/s2i-build/tags)\n[![license badge](https://img.shields.io/github/license/redhat-actions/s2i-build)](./LICENSE)\n[![size badge](https://img.shields.io/github/size/redhat-actions/s2i-build/dist/index.js)](./dist)\n\n`s2i-build` is a Github Action to build OCI-compatible container images from source code.\n\n[Source-to-Image (S2I)](https://github.com/openshift/source-to-image) is a toolkit and workflow for building reproducible\ncontainer images from source code.\nS2I produces images by injecting source code into a base S2I container image\nand letting the container prepare that source code for execution. The base\nS2I container images contain the language runtime and build tools needed for\nbuilding and running the source code.\n\nThis Action will install [the latest](https://github.com/openshift/source-to-image/releases/tag/v1.3.9) version of S2I.\n\nTo install any specific version of `s2i` use [**openshift-tools-installer**](https://github.com/marketplace/actions/openshift-tools-installer).\n**NOTE:**\n`s2i-build` only works on Linux platforms, because it relies on the Docker daemon.\u003cbr\u003e\nIf you are using GitHub's Ubuntu runners, the Docker daemon will already be available.\nOtherwise, you can use [docker-setup-buildx](https://github.com/marketplace/actions/docker-setup-buildx) to set up and start the Docker daemon.\n\nAlso see [**buildah-build**](https://github.com/marketplace/actions/buildah-build) for more configurable method of building images, from scratch or from a Dockerfile.\n\nOnce an image has been built, [**push-to-registry**](https://github.com/marketplace/actions/push-to-registry) can be used to push it to an image registry.\n\n\u003ca id=\"action-inputs\"\u003e\u003c/a\u003e\n\n## Action Inputs\n\n| Input Name | Description | Default |\n| ---------- | ----------- | ------- |\n| builder_image | The path of the S2I builder image. A curated list of builder images can be found [here](./builder-images.md). | **Required**\n| env_vars | List of environment variable key-value pairs to pass to the S2I builder context. (eg. `key=value`, `mysecret=${{ secrets.MY_SECRET }}`). | None\n| image | Name to give to the output image. | **Required**\n| tags | The tags of the image to build. For multiple tags, separate by a space. For example, `latest ${{ github.sha }}` | `latest`\n| log_level | [Log level](https://github.com/openshift/source-to-image/blob/master/docs/cli.md#log-levels) when running S2I. Can be 0 (least verbose) to 5 (most verbose). | `1`\n| path_context | The location of the path to run S2I from. This should be the path where your source code is stored. | `.`\n| include_git | Include all files during the S2I build including the .git folder. Set to `true` to enable. | `false`\n\n\u003ca id=\"outputs\"\u003e\u003c/a\u003e\n\n## Action Outputs\n\n`image`: The name of the built image.\u003cbr\u003e\nFor example, `spring-image`.\n\n`tags`: A list of the tags that were created, separated by spaces.\u003cbr\u003e\nFor example, `latest v1`.\n\n## Builder Images\n\nPlease refer to [this curated list of well maintained builder images](./builder-images.md). \n\nMany more images can be found under [sclorg](https://github.com/sclorg/).\n\n## Examples\n\nBelow is an example end to end workflow to build and push a Java application image using s2i-build.\n\n```yaml\n# This workflow builds a container image of a java\n# application using the source to image build strategy,\n# and pushes the image to quay.io.\n\nsteps:\n  env:\n    IMAGE_NAME: my-java-app\n    TAGS: v1 ${{ github.sha }}\n\n  - name: Checkout\n    uses: actions/checkout@v2\n\n  # Setup S2i and Build container image\n  - name: Setup and Build\n    id: build_image\n    uses: redhat-actions/s2i-build@v2\n    with:\n      path_context: '.'\n      # Builder image for a java project\n      builder_image: 'registry.access.redhat.com/openjdk/openjdk-11-rhel7'\n      image: ${{ env.IMAGE_NAME }}\n      tags: ${{ env.TAGS }}\n\n  # Push Image to Quay registry\n  - name: Push To Quay Action\n    uses: redhat-actions/push-to-registry@v2\n    with:\n      image: ${{ steps.build_image.outputs.image }}\n      tags: ${{ steps.build_image.outputs.tags }}\n      registry: quay.io/${{ secrets.QUAY_USERNAME }}\n      username: ${{ secrets.QUAY_USERNAME }}\n      password: ${{ secrets.QUAY_PASSWORD }}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredhat-actions%2Fs2i-build","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fredhat-actions%2Fs2i-build","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredhat-actions%2Fs2i-build/lists"}