{"id":6299337,"name":"opensciencegrid/build-container-action","ecosystem":"actions","description":"Builds and optionally caches/pushes the image","homepage":null,"licenses":"apache-2.0","normalized_licenses":["Apache-2.0"],"repository_url":"https://github.com/opensciencegrid/build-container-action","keywords_array":[],"namespace":"opensciencegrid","versions_count":12,"first_release_published_at":"2021-09-24T18:43:09.000Z","latest_release_published_at":"2025-06-12T22:15:47.000Z","latest_release_number":"v0.7.1","last_synced_at":"2026-05-13T08:32:16.586Z","created_at":"2023-02-10T04:49:11.410Z","updated_at":"2026-05-13T08:32:16.586Z","registry_url":"https://github.com/opensciencegrid/build-container-action","install_command":null,"documentation_url":null,"metadata":{"name":"OSG Build Container Action","description":"Builds and optionally caches/pushes the image","inputs":{"osg_series":{"description":"OSG release series used to install packages, intended for use with the OSG software-base image. Passed along as the BASE_OSG_SERIES build argument (default: 3.6)","required":false,"default":"3.6"},"osg_repo":{"description":"OSG Yum repositories enabled (including the upcoming equivalent), intended for use with the OSG software-base image. Passed along as the BASE_YUM_REPO build argument (default: release)","required":false,"default":"release"},"base_os":{"description":"Operating system of the base image, intended for use with the OSG software-base image.  Passed along as the BASE_OS build argument (default: el8)","required":false,"default":"el8"},"context":{"description":"Path to container files, including Dockerfile","required":false,"default":"."},"output_image":{"description":"Name of the image and tag for the resultant image build following the \u003cname\u003e/\u003ctag\u003e format, e.g. \"opensciencegrid/osgvo-docker-pilot:3.6-release\"","required":false,"default":""},"cache_image":{"description":"Store built images in GitHub the GitHub cache (default: true)","required":false,"default":true},"push_image":{"description":"Push the built image to a container registry (default: false). Requires 'registry_url', 'registry_user', and 'registry_pass' arguments.","required":false,"default":false},"registry_url":{"description":"URL for the target container registry\n","required":false},"registry_user":{"description":"Username for the target container registry. Should be kept in some form of GitHub secret.","required":false},"registry_pass":{"description":"Password for the target container registry. Should be kept in some form of GitHub secret.","required":false},"platform":{"description":"Platform of the image to build, e.g. \"linux/amd64\"","required":false,"default":"linux/amd64"},"push_by_digest":{"description":"Push the artifact to the registry without any associated tags.","required":false,"default":false},"buildx_setup":{"description":"Whether to run docker buildx setup. Should be set to false to preserve caching if multiple docker builds are run in a single job.","required":false,"default":true},"timestamp":{"description":"Timestamp tag for image. Intended for use as a unique, immutable identifier.  For example, \"20221207-1729\". Set to current timestamp if unspecified.","required":false,"default":""},"clean_before_build":{"description":"Whether to undo all unstaged changes to the repo prior to build. May interfere with artifacts generated in previous GHA steps.","required":false,"default":true}},"outputs":{"image-list":{"description":"Comma-separated list of image names. For example, \"opensciencegrid/osgvo-docker-pilot:3.6-release,opensciencegrid/osgvo-docker-pilot:3.6-release-20221207-1729\"","value":"${{ steps.generate-tags.outputs.tag_list }}"},"timestamp-image":{"description":"Image name, including timestamp tag. Intended for use as a unique, immutable identifier. For example, \"opensciencegrid/osgvo-docker-pilot:3.6-release-20221207-1729\"","value":"${{ steps.generate-tags.outputs.ts_image }}"},"cache_key":{"description":"Key referencing the GitHub cache containing the layers of the built container image","value":"${{ steps.generate-tags.outputs.cache_key }}"},"digest":{"description":"Key referencing the GitHub cache containing the layers of the built container image","value":"${{ steps.build-and-push.outputs.digest }}"}},"runs":{"using":"composite","steps":[{"uses":"actions/checkout@v3","with":{"clean":"${{ inputs.clean_before_build }}"}},{"name":"Check input requirements","if":"fromJSON(inputs.push_image) \u0026\u0026 ( ! inputs.registry_url || ! inputs.registry_user || ! inputs.registry_pass)","uses":"actions/github-script@v3","with":{"script":"core.setFailed(\"'push_image' specified but missing 'registry_url', 'registry_user', or 'registry_pass'\")\n"}},{"id":"generate-tags","if":"success()","name":"Generate tag list","shell":"bash","env":{"REGISTRY":"${{ inputs.registry_url }}","OSG_REPO":"${{ inputs.osg_repo }}","OSG_SERIES":"${{ inputs.osg_series }}","OUTPUT_IMAGE":"${{ inputs.output_image }}","TIMESTAMP":"${{ inputs.timestamp }}"},"run":"DEFAULT_TAG=${OSG_SERIES}-${OSG_REPO}\n\nif [[ -n \"${OUTPUT_IMAGE}\" ]]; then\n    IMAGE_NAME=${OUTPUT_IMAGE}\nelif [[ ${{ inputs.context }} == \".\" ]] || \\\n   [[ ${{ inputs.context }} == \"./\" ]]; then\n   # Try to guess the image name from our docker repo naming conventions\n   # E.g., opensciencegrid/docker-frontier-squid\n   IMAGE_NAME=${GITHUB_REPOSITORY/opensciencegrid\\/docker-//}:${DEFAULT_TAG}\nelif [[ -d ${{ inputs.context }} ]]; then\n   # Assume that the containing dir is the image name\n   IMAGE_NAME=$(basename ${{ inputs.context }}):${DEFAULT_TAG}\nelse\n  echo \"No output_image provided and ${{ inputs.context }} is not a directory\"\n  exit 1\nfi\n\n\nif [[ -z \"$TIMESTAMP\" ]]; then\n  TIMESTAMP=$(date +%Y%m%d-%H%M)\nfi\n\n# Timestamp is a build arg, so layer caching will fail when using buildx to push to multiple\n# registries if the registry is included. Always omit the registry from the build arg. \nTIMESTAMP_IMAGE_NO_REGISTRY=${IMAGE_NAME}-${TIMESTAMP}\n\n# If we're pushing images, we need to prepend the registry for the build-push-action\nif [[ -n \"${REGISTRY}\" ]]; then\n    IMAGE_NAME=${REGISTRY}/${IMAGE_NAME}\nfi\n\nTIMESTAMP_IMAGE=${IMAGE_NAME}-${TIMESTAMP}\n\necho \"tag_list=${IMAGE_NAME},${TIMESTAMP_IMAGE}\"                          \u003e\u003e ${GITHUB_OUTPUT}\necho \"ts_image=${TIMESTAMP_IMAGE}\"                                        \u003e\u003e ${GITHUB_OUTPUT}\necho \"ts_image_no_registry=${TIMESTAMP_IMAGE_NO_REGISTRY}\"                \u003e\u003e ${GITHUB_OUTPUT}\necho \"cache_key=$(tr ':/' '_' \u003c\u003c\u003c $TIMESTAMP_IMAGE)_buildx_${GITHUB_SHA}\" \u003e\u003e ${GITHUB_OUTPUT}\necho \"base_image=${IMAGE_NAME%:*}\"                                        \u003e\u003e ${GITHUB_OUTPUT}\n"},{"name":"Set up Docker Buildx","if":"success() \u0026\u0026 fromJSON(inputs.buildx_setup)","uses":"docker/setup-buildx-action@v2"},{"name":"Container Registry Login","if":"success() \u0026\u0026 fromJSON(inputs.push_image)","uses":"docker/login-action@v2","with":{"registry":"${{ inputs.registry_url }}","username":"${{ inputs.registry_user }}","password":"${{ inputs.registry_pass }}"}},{"name":"Build and push Docker images by digest","id":"build-and-push","if":"success() \u0026\u0026 fromJSON(inputs.push_by_digest)","uses":"docker/build-push-action@v6","with":{"context":"${{ inputs.context }}","platforms":"${{ inputs.platform }}","build-args":"BASE_YUM_REPO=${{ inputs.osg_repo }}\nBASE_OS=${{ inputs.base_os }}\nBASE_OSG_SERIES=${{ inputs.osg_series }}\nTIMESTAMP_IMAGE=${{ steps.generate-tags.outputs.ts_image_no_registry }}\n","outputs":"type=image,name=${{ steps.generate-tags.outputs.base_image }},push-by-digest=true,name-canonical=true,push=true"}},{"name":"Build and push Docker images","id":"build","if":"success() \u0026\u0026 !fromJSON(inputs.push_by_digest)","uses":"docker/build-push-action@v6","with":{"load":"${{ !fromJSON(inputs.push_image) }}","push":"${{ fromJSON(inputs.push_image) }}","context":"${{ inputs.context }}","platforms":"${{ inputs.platform }}","build-args":"BASE_YUM_REPO=${{ inputs.osg_repo }}\nBASE_OS=${{ inputs.base_os }}\nBASE_OSG_SERIES=${{ inputs.osg_series }}\nTIMESTAMP_IMAGE=${{ steps.generate-tags.outputs.ts_image_no_registry }}\n","tags":"${{ steps.generate-tags.outputs.tag_list }}"}},{"name":"Cache Docker images","if":"success() \u0026\u0026 fromJSON(inputs.cache_image)","uses":"actions/cache@v3","with":{"path":"/tmp/.buildx-cache","key":"${{ steps.generate-tags.outputs.cache_key }}"}}]},"default_branch":"main","path":null},"repo_metadata":{"id":40350329,"uuid":"405198005","full_name":"opensciencegrid/build-container-action","owner":"opensciencegrid","description":"GitHub Action for building OSG container images","archived":false,"fork":false,"pushed_at":"2025-06-18T15:10:38.000Z","size":43,"stargazers_count":0,"open_issues_count":0,"forks_count":5,"subscribers_count":6,"default_branch":"main","last_synced_at":"2026-01-24T18:40:58.318Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/opensciencegrid.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-09-10T19:55:58.000Z","updated_at":"2025-06-12T22:15:50.000Z","dependencies_parsed_at":"2024-01-25T19:40:15.701Z","dependency_job_id":null,"html_url":"https://github.com/opensciencegrid/build-container-action","commit_stats":{"total_commits":44,"total_committers":3,"mean_commits":"14.666666666666666","dds":"0.31818181818181823","last_synced_commit":"fc2c6a6df98043b03126b03a0e6a33c43adda47a"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/opensciencegrid/build-container-action","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opensciencegrid%2Fbuild-container-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opensciencegrid%2Fbuild-container-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opensciencegrid%2Fbuild-container-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opensciencegrid%2Fbuild-container-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/opensciencegrid","download_url":"https://codeload.github.com/opensciencegrid/build-container-action/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opensciencegrid%2Fbuild-container-action/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29332661,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-11T06:13:03.264Z","status":"ssl_error","status_checked_at":"2026-02-11T06:12:55.843Z","response_time":97,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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"},"tags":[]},"repo_metadata_updated_at":"2026-02-11T15:16:30.317Z","dependent_packages_count":0,"downloads":null,"downloads_period":null,"dependent_repos_count":7,"rankings":{"downloads":null,"dependent_repos_count":13.722072571700206,"dependent_packages_count":0.0,"stargazers_count":48.363175408017746,"forks_count":9.507209633972428,"docker_downloads_count":null,"average":17.898114403422596},"purl":"pkg:githubactions/opensciencegrid/build-container-action","advisories":[],"docker_usage_url":"https://docker.ecosyste.ms/usage/actions/opensciencegrid/build-container-action","docker_dependents_count":null,"docker_downloads_count":null,"usage_url":"https://repos.ecosyste.ms/usage/actions/opensciencegrid/build-container-action","dependent_repositories_url":"https://repos.ecosyste.ms/api/v1/usage/actions/opensciencegrid/build-container-action/dependencies","status":null,"funding_links":[],"critical":null,"issue_metadata":{"last_synced_at":"2023-08-09T10:17:02.358Z","issues_count":0,"pull_requests_count":9,"avg_time_to_close_issue":null,"avg_time_to_close_pull_request":2995670.0,"issues_closed_count":0,"pull_requests_closed_count":8,"pull_request_authors_count":5,"issue_authors_count":0,"avg_comments_per_issue":null,"avg_comments_per_pull_request":1.1111111111111112,"merged_pull_requests_count":6,"bot_issues_count":0,"bot_pull_requests_count":0,"past_year_issues_count":0,"past_year_pull_requests_count":3,"past_year_avg_time_to_close_issue":null,"past_year_avg_time_to_close_pull_request":2183072.6666666665,"past_year_issues_closed_count":0,"past_year_pull_requests_closed_count":3,"past_year_pull_request_authors_count":2,"past_year_issue_authors_count":0,"past_year_avg_comments_per_issue":null,"past_year_avg_comments_per_pull_request":1.6666666666666667,"past_year_bot_issues_count":0,"past_year_bot_pull_requests_count":0,"past_year_merged_pull_requests_count":3,"issues_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/repositories/opensciencegrid%2Fbuild-container-action/issues"},"versions_url":"https://packages.ecosyste.ms/api/v1/registries/github%20actions/packages/opensciencegrid%2Fbuild-container-action/versions","version_numbers_url":"https://packages.ecosyste.ms/api/v1/registries/github%20actions/packages/opensciencegrid%2Fbuild-container-action/version_numbers","latest_version_url":"https://packages.ecosyste.ms/api/v1/registries/github%20actions/packages/opensciencegrid%2Fbuild-container-action/latest_version","dependent_packages_url":"https://packages.ecosyste.ms/api/v1/registries/github%20actions/packages/opensciencegrid%2Fbuild-container-action/dependent_packages","related_packages_url":"https://packages.ecosyste.ms/api/v1/registries/github%20actions/packages/opensciencegrid%2Fbuild-container-action/related_packages","codemeta_url":"https://packages.ecosyste.ms/api/v1/registries/github%20actions/packages/opensciencegrid%2Fbuild-container-action/codemeta","maintainers":[]}