{"id":18838291,"url":"https://github.com/aleskxyz/build-push","last_synced_at":"2025-09-03T04:31:10.341Z","repository":{"id":230445303,"uuid":"779398183","full_name":"aleskxyz/build-push","owner":"aleskxyz","description":"Github Action to Build and Push Docker Image ","archived":false,"fork":false,"pushed_at":"2024-04-01T12:56:07.000Z","size":78,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-11-08T02:42:41.634Z","etag":null,"topics":["action-runner-controller","actions","arc","build","buildah","container","docker","github-actions","kubernetes","multiarch","podman","push","registry","rootless","runner","unprivileged"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aleskxyz.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2024-03-29T18:41:04.000Z","updated_at":"2024-05-19T06:27:16.000Z","dependencies_parsed_at":"2024-11-08T02:39:13.514Z","dependency_job_id":"957584f7-645a-49fc-a1ff-ca2811285239","html_url":"https://github.com/aleskxyz/build-push","commit_stats":null,"previous_names":["aleskxyz/build-push"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aleskxyz%2Fbuild-push","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aleskxyz%2Fbuild-push/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aleskxyz%2Fbuild-push/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aleskxyz%2Fbuild-push/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aleskxyz","download_url":"https://codeload.github.com/aleskxyz/build-push/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":231835377,"owners_count":18433710,"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-runner-controller","actions","arc","build","buildah","container","docker","github-actions","kubernetes","multiarch","podman","push","registry","rootless","runner","unprivileged"],"created_at":"2024-11-08T02:38:41.347Z","updated_at":"2024-12-30T08:44:30.008Z","avatar_url":"https://github.com/aleskxyz.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# build-push\n\nBuilds Docker images with customized image tags, labels, and annotations, and pushes them to a specified container registry. It is designed to run in a rootless, unprivileged container for enhanced security, including environments like self-hosted GitHub Action Runner Controller (ARC) on Kubernetes.\n\nThis is a composite GitHub Action that incorporates the following actions:\n\n- [docker/metadata-action](https://github.com/docker/metadata-action)\n- [redhat-actions/podman-login](https://github.com/redhat-actions/podman-login)\n- [redhat-actions/buildah-build](https://github.com/redhat-actions/buildah-build)\n- [redhat-actions/push-to-registr](https://github.com/redhat-actions/push-to-registr)\n\n## Inputs\n\n| Name | Description | Required | Default |\n|------|-------------|----------|---------|\n| `image_name` | Name of the Docker image to be built and pushed. | Yes | - |\n| `registry_address` | URL of the container registry where the image will be pushed. | Yes | - |\n| `registry_username` | Username for authentication with the container registry. | Yes | - |\n| `registry_password` | Password for authentication with the container registry. | Yes | - |\n| `context` | The directory path used as the build context. | No | `./` |\n| `dockerfile_path` | Location of the Dockerfile. | No | `Dockerfile` |\n| `flavor` | Specifies the tagging strategy. For options, see [Docker Metadata Action documentation](https://github.com/docker/metadata-action?tab=readme#flavor-input). | No | - |\n| `tags` | Defines how the image is tagged. For detailed configuration, refer to [Docker Metadata Action documentation](https://github.com/docker/metadata-action?tab=readme#tags-input). | No | \u003cpre\u003etype=sha\u003cbr\u003etype=ref,event=branch\u003cbr\u003etype=ref,event=pr\u003cbr\u003etype=schedule,pattern={{date 'YYYYMMDD-hhmmss'}}\u003cbr\u003etype=semver,pattern={{version}}\u003cbr\u003etype=semver,pattern={{major}}.{{minor}}\u003cbr\u003etype=semver,pattern={{major}},enable=${{ !startsWith(github.ref, 'refs/tags/v0.') }}\u003c/pre\u003e |\n| `labels` | Custom labels to apply to the built image, separated by newlines. | No | - |\n| `annotations` | Additional annotations for the image, separated by newlines. | No | - |\n| `archs` | CPU architectures to target during the build, separated by commas (eg: `amd64,arm64`). **Note: Not functional in Kubernetes (ARC). Cannot be used with `platforms`.** | No | - |\n| `platforms` | Target platforms for the image build, separated by commas (eg: `linux/amd64,linux/arm64`). **Note: Not functional in Kubernetes (ARC). Cannot be used with `archs`.** | No | - |\n| `build_args` | Build-time variables in the form arg_name=arg_value. Separate multiple arguments with newlines. These are passed to Docker build with --build-arg. | No | - |\n| `buildah_extra_args` | Additional arguments for the `buildah bud` command, separated by newlines. | No | - |\n| `oci` | Sets the image format. `true` for OCI format, `false` for Docker format. Default is false. | No | `false` |\n| `push_extra_args` | Extra arguments for the `podman push` command, separated by newlines. | No | - |\n\n## Outputs\n\n| Name | Description |\n|------|-------------|\n| `push_result` | JSON string with the digest and registry paths for pushed images. |\n\n## Example Usage\n\n```yaml\nname: Build image and Push to  Github Container Registry\n\non:\n  push:\n\njobs:\n  build-push-ghcr:\n    name: Build and push image\n    runs-on: ubuntu-22.04\n\n    permissions:\n      contents: read\n      packages: write\n\n    steps:\n    - name: Checkout\n      uses: actions/checkout@v4\n\n    - name: Build and Push Docker image to GHCR\n      uses: aleskxyz/build-push@v1\n      with:\n        image_name: ${{ github.event.repository.name }}\n        registry_address: ghcr.io/${{ github.repository_owner }}\n        registry_username: ${{ github.actor }}\n        registry_password: ${{ github.token }}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faleskxyz%2Fbuild-push","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faleskxyz%2Fbuild-push","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faleskxyz%2Fbuild-push/lists"}