{"id":19120943,"url":"https://github.com/php-actions/php-build","last_synced_at":"2025-05-05T16:25:05.338Z","repository":{"id":43723377,"uuid":"308098708","full_name":"php-actions/php-build","owner":"php-actions","description":"Fast builds for repositories using php-actions.","archived":false,"fork":false,"pushed_at":"2024-11-21T09:01:13.000Z","size":66,"stargazers_count":10,"open_issues_count":5,"forks_count":9,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-19T10:28:03.769Z","etag":null,"topics":["fast-build","github-actions","php","php7","php8"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/php-actions.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"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,"zenodo":null},"funding":{"github":["g105b"]}},"created_at":"2020-10-28T17:55:22.000Z","updated_at":"2024-12-07T03:33:30.000Z","dependencies_parsed_at":"2023-12-15T13:42:04.430Z","dependency_job_id":"af27adef-44b1-4b73-984e-6e805dcba71f","html_url":"https://github.com/php-actions/php-build","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/php-actions%2Fphp-build","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/php-actions%2Fphp-build/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/php-actions%2Fphp-build/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/php-actions%2Fphp-build/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/php-actions","download_url":"https://codeload.github.com/php-actions/php-build/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252532649,"owners_count":21763448,"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":["fast-build","github-actions","php","php7","php8"],"created_at":"2024-11-09T05:15:33.530Z","updated_at":"2025-05-05T16:25:05.319Z","avatar_url":"https://github.com/php-actions.png","language":"Shell","readme":"# Fast builds for repositories using php-actions\n\nv1 of this repository used a totally different architecture and had different goals to the current version. Previously, a customised Dockerfile was used as the base for all php-actions repositories, but now php-actions workflows run as [composite run steps][composite], building a customised docker image per-application, based off the official PHP script.\n\nThe bash script within this repository is run as [composite run steps][composite] in [php-actions repositories][php-actions]. It builds a minimal docker image for running each particular php-action job and pushes the built image as a package, stored on the repository that is using the action.\n\nYou do not need to know the following information if you want to use a php-actions Github Action within your own repository - only if you are planning on contributing to the php-actions base Docker image.\n\nEnvironment variables\n---------------------\n\nThe following environment variables must be passed to the composite run step:\n\n+ `GITHUB_ACTOR` - The name of the person or app that initiated the workflow, for example: `g105b`. This user will be used to authenticate the pull/push of the Docker image.\n+ `GITHUB_REPOSITORY` - The owner and repository name of the repository running the action, for example: `phpgt/database`. This is where the built image will be pushed to as a package.\n+ `ACTION_TOKEN` - The Github PAT used to authenticate the `docker login` step. This is probably taken directly from the `github.token` secret, which is generated automatically by the action runner.\n+ `ACTION_PHP_VERSION` - The semver version number string of the required PHP version to use.\n\nThe following environment variables are optionally passed to the composite run step:\n\n+ `ACTION_PHP_EXTENSIONS` - A space-separated list of extensions to enable.\n\nChoosing the PHP version\n------------------------\n\nThe `ACTION_PHP_VERSION` environment variable must be passed to the composite run step. This string must match any of the [officially supported PHP version numbers][tag-list] (version number only, with no derivative text, e.g. `8.0.1` or `8` rather than `8-cli`).\n\nThe official Alpine CLI build of the requested version will be used as the image's base.\n\nEnabling/disabling extensions\n-----------------------------\n\nThe `ACTION_PHP_EXTENSIONS` environment variable can be passed to the composite run step. This string must be a space separated list of all extension names required by the running action's repository. The names of the extensions may also include a version number to use.\n\nFor example: `gd xdebug-2.9.7 zip`.\n\nThe functionality of building PHP extensions is provided by [mlocati's docker-php-extension-installer repository][mlocati]. A full list of supported extension names is [available within the readme][mlocati-readme].\n\nUsing the docker tag from subsequent scripts\n--------------------------------------------\n\nOnce the Docker image is built and tagged, the name of the tag will be written to a file called `docker_tag` within the current working directory. This can then be read by a subsequent script.\n\nVersion caching php-build\n-------------------------\n\nThis repo, `php-build` shouldn't change very regularly, but when it does, the entire build pipeline of dependent repositories will need refreshing. This is done by adding the version of `php-build` to the end of build package names. When a new release is made that affects php-build functionality, the variable at the top of `php-build.bash` can be updated to invalidate any caches.\n\nWithin other repositories that use `php-build`, they can refer to the specific version of the script by addressing its git commit hash. For example: \u003chttps://raw.githubusercontent.com/php-actions/php-build/27be075494ae8a9bc0d10deb408e37b197986b8a/php-build.bash\u003e\n\n***\n\nIf you found this repository helpful, please consider [sponsoring the developer][sponsor].\n\n[composite]: https://github.blog/changelog/2020-08-07-github-actions-composite-run-steps/\n[php-actions]: https://github.com/php-actions\n[tag-list]: https://github.com/docker-library/docs/blob/master/php/README.md#supported-tags-and-respective-dockerfile-links\n[mlocati]: https://github.com/mlocati/docker-php-extension-installer\n[mlocati-readme]: https://github.com/mlocati/docker-php-extension-installer#supported-php-extensions\n[sponsor]: https://github.com/sponsors/g105b\n","funding_links":["https://github.com/sponsors/g105b"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphp-actions%2Fphp-build","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphp-actions%2Fphp-build","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphp-actions%2Fphp-build/lists"}