{"id":13474374,"url":"https://github.com/vsoch/containertree","last_synced_at":"2025-10-07T04:42:13.355Z","repository":{"id":141667688,"uuid":"164856664","full_name":"vsoch/containertree","owner":"vsoch","description":"Github action example to deploy container-diff derived tree to Github pages, along with container metadata","archived":false,"fork":false,"pushed_at":"2019-01-10T00:34:22.000Z","size":928,"stargazers_count":5,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-12T12:12:04.817Z","etag":null,"topics":["container-diff","containertree","github-actions"],"latest_commit_sha":null,"homepage":"https://vsoch.github.io/containertree/","language":"HCL","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/vsoch.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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}},"created_at":"2019-01-09T12:13:27.000Z","updated_at":"2019-11-16T02:45:18.000Z","dependencies_parsed_at":null,"dependency_job_id":"8713cdb0-baf7-436e-bbef-e0a1a12c0ffa","html_url":"https://github.com/vsoch/containertree","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vsoch%2Fcontainertree","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vsoch%2Fcontainertree/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vsoch%2Fcontainertree/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vsoch%2Fcontainertree/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vsoch","download_url":"https://codeload.github.com/vsoch/containertree/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248565078,"owners_count":21125417,"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":["container-diff","containertree","github-actions"],"created_at":"2024-07-31T16:01:11.911Z","updated_at":"2025-10-07T04:42:08.304Z","avatar_url":"https://github.com/vsoch.png","language":"HCL","funding_links":[],"categories":["Community Resources"],"sub_categories":["GitHub Pages"],"readme":"# ContainerTree Actions\n\nThis Github repository will deploy (and show) example Github Actions workflows\nfor interacting with Google's Container Diff, along with the python\nmodule (containertree) that uses it.\n\n\u003e What does this mean, in layman's terms?\n\nThis action will deploy a containertree to your Github pages after deploying\na Docker container.\n\n# Usage\n\nFirst, set up your `.github/main.workflow` in your repository to look like this:\n\n```bash\nworkflow \"Deploy ContainerTree Extraction\" {\n  on = \"push\"\n  resolves = [\"deploy\"]\n}\n\naction \"login\" {\n  uses = \"actions/docker/login@master\"\n  secrets = [\"DOCKER_USERNAME\", \"DOCKER_PASSWORD\"]\n}\n\naction \"extract\" {\n  uses = \"docker://singularityhub/container-tree\"\n  args = [\"--quiet generate --output=/github/workspace vanessa/salad\"]\n}\n\naction \"list\" {\n  needs = [\"extract\"]\n  uses = \"actions/bin/sh@master\"\n  runs = \"ls\"\n  args = [\"/github/workspace\"]\n}\n\naction \"deploy\" {\n  needs = [\"login\", \"extract\", \"list\"]\n  uses = \"vsoch/github-deploy@master\"\n  secrets = [\"GITHUB_TOKEN\"]\n  args = [\"index.html data.json\"]\n}\n```\n\nIn the above, we are:\n\n 1. Logging in to the docker daemon, in case we wanted to push\n 2. Using the SingularityHub ContainerTree container to extract static files to the github workspace\n 3. For our own debugging, listing the files in the workspace after generation\n 4. Deploying back to Github Pages using the [vsoch/github-deploy](https://github.com/vsoch/github-deploy) repository.\n\nIf you have a Dockerfile in your repository, then you can build and deploy it,\nand then generate its tree for Github pages! Notice below we've added\nsteps to build and push.\n\n```\nworkflow \"Deploy ContainerTree Extraction\" {\n  on = \"push\"\n  resolves = [\"deploy\"]\n}\n\naction \"login\" {\n  uses = \"actions/docker/login@master\"\n  secrets = [\"DOCKER_USERNAME\", \"DOCKER_PASSWORD\"]\n}\n\naction \"build\" {\n  uses = \"actions/docker/cli@master\"\n  args = \"build -t vanessa/salad .\"\n}\n\naction \"push\" {\n  needs = [\"login\", \"build\"]\n  uses = \"actions/docker/cli@master\"\n  args = \"push vanessa/salad\"\n}\n\naction \"extract\" {\n  uses = \"docker://singularityhub/container-tree\"\n  args = [\"--quiet generate --output=/github/workspace vanessa/salad\"]\n}\n\naction \"list\" {\n  needs = [\"extract\"]\n  uses = \"actions/bin/sh@master\"\n  runs = \"ls\"\n  args = [\"/github/workspace\"]\n}\n\naction \"deploy\" {\n  needs = [\"login\", \"extract\", \"list\"]\n  uses = \"vsoch/github-deploy@master\"\n  secrets = [\"GITHUB_TOKEN\"]\n  args = [\"index.html data.json\"]\n}\n```\n\nWhen you deploy to Github pages for the first time, you will\nneed to switch Github Pages to deploy from master and then back to the `gh-pages`\nbranch on deploy. There is a known issue with Permissions if you deploy\nto the brain without activating it (as an admin) from the respository first.\n\n## Other Examples\n\nIf you just want to generate the data.json for Container Diff (and roll\nyour own visualization) here is an example main.workflow to get you started:\n\n```\nworkflow \"Run container-diff isolated\" {\n  on = \"push\"\n  resolves = [\"list\"]\n}\n\naction \"Run container-diff\" {\n  uses = \"vsoch/container-diff/actions@add/github-actions\"\n  args = [\"analyze vanessa/salad --type=file --output=/github/workspace/data.json --json\"]\n}\n\naction \"list\" {\n  needs = [\"Run container-diff\"]\n  uses = \"actions/bin/sh@master\"\n  runs = \"ls\"\n  args = [\"/github/workspace\"]\n}\n```\n\nNote that the above for container-diff is currently opened as a pull request, so\nyou should soon be able to use the uri `GoogleContainerTools/container-diff@master`.\nIf you have any questions, please [open up an issue](https://www.github.com/vsoch/containertree)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvsoch%2Fcontainertree","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvsoch%2Fcontainertree","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvsoch%2Fcontainertree/lists"}