{"id":15099303,"url":"https://github.com/actions/container-prebuilt-action","last_synced_at":"2026-02-26T16:19:42.615Z","repository":{"id":216137883,"uuid":"729158353","full_name":"actions/container-prebuilt-action","owner":"actions","description":null,"archived":false,"fork":false,"pushed_at":"2026-02-18T21:02:01.000Z","size":97,"stargazers_count":12,"open_issues_count":0,"forks_count":5,"subscribers_count":3,"default_branch":"main","last_synced_at":"2026-02-25T17:30:37.728Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Dockerfile","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/actions.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":"CODEOWNERS","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":"2023-12-08T14:55:49.000Z","updated_at":"2026-02-18T21:02:04.000Z","dependencies_parsed_at":"2025-12-19T10:06:04.947Z","dependency_job_id":null,"html_url":"https://github.com/actions/container-prebuilt-action","commit_stats":{"total_commits":31,"total_committers":2,"mean_commits":15.5,"dds":0.3870967741935484,"last_synced_commit":"7ba088debe425a4d848a046b64d86c6c2325c1e9"},"previous_names":["actions/container-prebuilt-action"],"tags_count":4,"template":true,"template_full_name":null,"purl":"pkg:github/actions/container-prebuilt-action","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/actions%2Fcontainer-prebuilt-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/actions%2Fcontainer-prebuilt-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/actions%2Fcontainer-prebuilt-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/actions%2Fcontainer-prebuilt-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/actions","download_url":"https://codeload.github.com/actions/container-prebuilt-action/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/actions%2Fcontainer-prebuilt-action/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29864367,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-26T08:51:08.701Z","status":"ssl_error","status_checked_at":"2026-02-26T08:50:19.607Z","response_time":89,"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"}},"keywords":[],"created_at":"2024-09-25T17:09:50.574Z","updated_at":"2026-02-26T16:19:42.582Z","avatar_url":"https://github.com/actions.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Create a Container Prebuilt Action\n\n[![GitHub Super-Linter](https://github.com/actions/container-prebuilt-action/actions/workflows/linter.yml/badge.svg)](https://github.com/super-linter/super-linter)\n![Continuous Integration](https://github.com/actions/container-prebuilt-action/actions/workflows/ci.yml/badge.svg)\n\nUse this template to bootstrap the creation of a container action. :rocket:\n\nThis template includes compilation support, tests, a validation workflow,\npublishing, and versioning guidance. The core difference between this template\nand [`actions/container-action`](https://github.com/actions/container-action) is\nthat this template does not build the container image on every action run.\nInstead, the action pulls the image from\n[GitHub Container Registry (ghcr.io)](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry).\n\nIf you would like to use the\n[GitHub Actions Toolkit](https://github.com/actions/toolkit) in your container\naction, see the\n[Container Toolkit Action](https://github.com/actions/container-toolkit-action)\nrepository.\n\n## Create Your Own Action\n\nTo create your own action, you can use this repository as a template! Just\nfollow the below instructions:\n\n1. Click the **Use this template** button at the top of the repository\n1. Select **Create a new repository**\n1. Select an owner and name for your new repository\n1. Click **Create repository**\n1. Clone your new repository\n\n\u003e [!IMPORTANT]\n\u003e\n\u003e Make sure to remove or update the [`CODEOWNERS`](./CODEOWNERS) file! For\n\u003e details on how to use this file, see\n\u003e [About code owners](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners).\n\n## Initial Setup\n\nAfter you've cloned the repository to your local machine or codespace, you'll\nneed to perform some initial setup steps before you can develop your action.\n\n\u003e [!NOTE]\n\u003e\n\u003e You'll need to have a reasonably modern version of\n\u003e [Docker](https://www.docker.com/get-started/) handy (e.g. docker engine\n\u003e version 20 or later).\n\n1. :hammer_and_wrench: Build the container\n\n   Make sure to replace `actions/container-prebuilt-action` with an appropriate\n   label for your container.\n\n   ```bash\n   docker build -t actions/container-prebuilt-action .\n   ```\n\n1. :white_check_mark: Test the container\n\n   You can pass individual environment variables using the `--env` or `-e` flag.\n\n   ```bash\n   $ docker run --env INPUT_WHO_TO_GREET=\"Mona Lisa Octocat\" actions/container-prebuilt-action\n   ::notice file=entrypoint.sh,line=7::Hello, Mona Lisa Octocat!\n   ```\n\n   Or you can pass a file with environment variables using `--env-file`.\n\n   ```bash\n   $ cat ./.env.test\n   INPUT_WHO_TO_GREET=\"Mona Lisa Octocat\"\n\n   $ docker run --env-file ./.env.test actions/container-prebuilt-action\n   ::notice file=entrypoint.sh,line=7::Hello, Mona Lisa Octocat!\n   ```\n\n## Update the Action Metadata\n\nThe [`action.yml`](action.yml) file defines metadata about your action, such as\ninput(s) and output(s). For details about this file, see\n[Metadata syntax for GitHub Actions](https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions).\n\nWhen you copy this repository, update `action.yml` with the name, description,\ninputs, and outputs for your action.\n\n\u003e [!IMPORTANT]\n\u003e\n\u003e Make sure to update the `image` property to use your repository!\n\u003e\n\u003e ```yaml\n\u003e runs:\n\u003e   using: docker\n\u003e   image: docker://ghcr.io/\u003cowner\u003e/\u003crepository\u003e:\u003ctag\u003e\n\u003e ```\n\n## Update the Action Code\n\nIn this template, the container action runs a shell script,\n[`entrypoint.sh`](./entrypoint.sh), when the container is launched. Since you\ncan choose any base Docker image and language you like, you can change this to\nsuite your needs. There are a few main things to remember when writing code for\ncontainer actions:\n\n- Inputs are accessed using argument identifiers or environment variables\n  (depending on what you set in your `action.yml`). For example, the first input\n  to this action, `who-to-greet`, can be accessed in the entrypoint script using\n  the `$INPUT_WHO_TO_GREET` environment variable.\n\n  ```bash\n  GREETING=\"Hello, $INPUT_WHO_TO_GREET!\"\n  ```\n\n- GitHub Actions supports a number of different workflow commands such as\n  creating outputs, setting environment variables, and more. These are\n  accomplished by writing to different `GITHUB_*` environment variables. For\n  more information, see\n  [Workflow commands](https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions).\n\n  | Scenario              | Example                                         |\n  | --------------------- | ----------------------------------------------- |\n  | Set environment vars  | `echo \"MY_VAR=my-value\" \u003e\u003e \"$GITHUB_ENV\"`       |\n  | Set outputs           | `echo \"greeting=$GREETING\" \u003e\u003e \"$GITHUB_OUTPUT\"` |\n  | Prepend to `PATH`     | `echo \"$HOME/.local/bin\" \u003e\u003e \"$GITHUB_PATH\"`     |\n  | Set `pre`/`post` vars | `echo \"MY_VAR=my-value\" \u003e\u003e \"$GITHUB_STATE\"`     |\n  | Set step summary      | `echo \"{markdown}\" \u003e\u003e \"$GITHUB_STEP_SUMMARY\"`   |\n\n  You can write multiline strings using the following syntax:\n\n  ```bash\n  {\n    echo \"JSON_RESPONSE\u003c\u003cEOF\"\n    curl https://example.com\n    echo \"EOF\"\n  } \u003e\u003e \"$GITHUB_ENV\"\n  ```\n\n- Make sure that the script being run is executable!\n\n  ```bash\n  git add entrypoint.sh\n  git update-index --chmod=+x entrypoint.sh\n  ```\n\nSo, what are you waiting for? Go ahead and start customizing your action!\n\n1. Create a new branch\n\n   ```bash\n   git checkout -b releases/v1\n   ```\n\n1. Replace the contents of `entrypoint.sh` with your action code\n1. Build and test the container\n\n   ```bash\n   docker build -t actions/container-prebuilt-action .\n   docker run actions/container-prebuilt-action \"Mona Lisa Octocat\"\n   ```\n\n1. Commit your changes\n\n   ```bash\n   git add .\n   git commit -m \"My first action is ready!\"\n   ```\n\n1. Push them to your repository\n\n   ```bash\n   git push -u origin releases/v1\n   ```\n\n1. Create a pull request and get feedback on your action\n1. Merge the pull request into the `main` branch\n\nYour action is now published! :rocket:\n\nFor information about versioning your action, see\n[Versioning](https://github.com/actions/toolkit/blob/main/docs/action-versioning.md)\nin the GitHub Actions toolkit.\n\n## Releasing Versions\n\nBy default, the [`cd.yml` workflow](./.github/workflows/cd.yml) in this\nrepository is configured to release a new version of the action any time a pull\nrequest is merged into the default branch (`main`). In order to prevent existing\nversions from being overwritten, the\n[`version-check.yml` workflow](./.github/workflows/version-check.yml) can be\nused as a\n[required status check](https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-protected-branches/about-protected-branches#require-status-checks-before-merging)\nin your branch protection rules.\n\nAs part of the pull request, make sure to update the\n[`.version` file](./.version) to a new [Semantic Version](https://semver.org/).\n\n## Usage\n\nAfter testing, you can create version tag(s) that developers can use to\nreference different stable versions of your action. For more information, see\n[Versioning](https://github.com/actions/toolkit/blob/main/docs/action-versioning.md)\nin the GitHub Actions toolkit.\n\nTo include the action in a workflow in another repository, you can use the\n`uses` syntax with the `@` symbol to reference a specific branch, tag, or commit\nhash.\n\n```yaml\nsteps:\n  - name: Checkout\n    id: checkout\n    uses: actions/checkout@v4\n\n  - name: Test Local Action\n    id: test-action\n    uses: actions/container-prebuilt-action@v1 # Commit with the `v1` tag\n    with:\n      who-to-greet: Mona Lisa Octocat\n\n  - name: Print Output\n    id: output\n    run: echo \"${{ steps.test-action.outputs.greeting }}\"\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Factions%2Fcontainer-prebuilt-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Factions%2Fcontainer-prebuilt-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Factions%2Fcontainer-prebuilt-action/lists"}