{"id":21450635,"url":"https://github.com/mietzen/docker-ci-template","last_synced_at":"2025-03-17T02:24:38.036Z","repository":{"id":225612545,"uuid":"766400597","full_name":"mietzen/docker-ci-template","owner":"mietzen","description":"This template will automatically build, release and push docker images for you as soon as a new base image is available.","archived":false,"fork":false,"pushed_at":"2024-08-04T11:45:40.000Z","size":1027,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-23T12:15:44.366Z","etag":null,"topics":["ci","ci-cd","docker","github-actions","multi-arch","multi-arch-images","repo-template","repository-template","template"],"latest_commit_sha":null,"homepage":"","language":null,"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/mietzen.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-03T06:40:38.000Z","updated_at":"2024-08-04T11:45:43.000Z","dependencies_parsed_at":"2024-11-23T06:32:15.658Z","dependency_job_id":null,"html_url":"https://github.com/mietzen/docker-ci-template","commit_stats":null,"previous_names":["mietzen/docker-repack-template","mietzen/docker-ci-template"],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mietzen%2Fdocker-ci-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mietzen%2Fdocker-ci-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mietzen%2Fdocker-ci-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mietzen%2Fdocker-ci-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mietzen","download_url":"https://codeload.github.com/mietzen/docker-ci-template/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243960637,"owners_count":20375108,"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":["ci","ci-cd","docker","github-actions","multi-arch","multi-arch-images","repo-template","repository-template","template"],"created_at":"2024-11-23T04:16:03.295Z","updated_at":"2025-03-17T02:24:38.014Z","avatar_url":"https://github.com/mietzen.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Docker CI Template\n\nThis template will automatically build, release and push docker images for you as soon as a new base image is available.\n\nSimply place a `Dockerfile` at the root of the repo e.g.:\n\n```\nFROM debian:bookworm-20240211\n\nRUN apt-get update \u0026\u0026 apt-get install -y \\\n    fortune \\\n    cowsay \\\n    \u0026\u0026 rm -rf /var/lib/apt/lists/*\nRUN echo '/usr/games/fortune | /usr/games/cowsay \u0026\u0026 echo -e \"\\n\"' \u003e\u003e /etc/bash.bashrc\n```\n\nIs important **not** to use a tag like `latest`, `stable` or any other tag that is not regular updated. For debian there are for example images with a date inside the tag.\n\nThe workflows will automatically build and release a new debian images with a `cowsay` message of the day under the following name: `{DOCKER_HUB_USERNAME}/{REPO_NAME}:{BASE_IMAGE_TAG}` e.g.: `mietzen/debian-cowsay:bookworm-20240211` (The latest image also gets the `latest` tag)\n\n**Cowsay Example:** [https://github.com/mietzen/debian-cowsay](https://github.com/mietzen/debian-cowsay)\n\nThe workflow will build all platform listed in [`platforms.json`](.github/platforms.json) and also push them as a multi-arch image.\n\n## Usage\n\nClick on `Use this template`:\n\n![](https://github.com/mietzen/docker-ci-template/blob/8cf107cd387f7301ac6625cf324416965b362974/use-template.png?raw=true)\n\nAnd follow the preparation steps.\n\n## Preparation\n\n### Github Token App\n\nFor the workflow to run you need to create a GitHub-App to generate tokens, follow:\n\n[https://github.com/actions/create-github-app-token](https://github.com/actions/create-github-app-token?tab=readme-ov-file#usage)\n\nIf you follow the instructions above you should have your App listed under `Settings -\u003e GitHub Apps`:\n\n![](https://github.com/mietzen/docker-ci-template/blob/313cb3c73a4ce2a43397a3a749bfcc238c967367/github-app.png?raw=true)\n\n### Repository config\n\nYou need to activate `auto-merge` under `Settings -\u003e General -\u003e Pull Requests`:\n\n![](https://github.com/mietzen/docker-ci-template/blob/313cb3c73a4ce2a43397a3a749bfcc238c967367/auto-merge.png?raw=true)\n\nand setup the branch protection for `main` under `Settings -\u003e Branch -\u003e Add branch protection rule`, for `Branch name pattern` type in `main`:\n\nThen apply the following settings:\n\n![](https://github.com/mietzen/docker-ci-template/blob/313cb3c73a4ce2a43397a3a749bfcc238c967367/branch-protection.png?raw=true)\n\n**The status check `Check-Build` is only available after the `docker-image.yml` ran at least one time. You can trigger the workflow by simply opening a Pull-Request e.g. to add your `Dockerfile`.**\n\n#### Secrets\n\nYou need to add the following secrets as repository secrets in Actions:\n\n- `APP_ID`\n- `APP_PRIVATE_KEY`\n- `DOCKER_HUB_DEPLOY_KEY`\n\n![](https://github.com/mietzen/docker-ci-template/blob/313cb3c73a4ce2a43397a3a749bfcc238c967367/action-secrets.png?raw=true)\n\n**and** to Dependabot:\n\n- `APP_ID`\n- `APP_PRIVATE_KEY`\n\n![](https://github.com/mietzen/docker-ci-template/blob/313cb3c73a4ce2a43397a3a749bfcc238c967367/dependabot-secrets.png?raw=true)\n\n[Optional] Add your DockerHub username and/or the docker image name under variables:\n\n- `DOCKER_HUB_USERNAME`\n- `IMAGE_NAME`\n\n![](https://github.com/mietzen/docker-ci-template/blob/313cb3c73a4ce2a43397a3a749bfcc238c967367/actions-vars.png?raw=true)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmietzen%2Fdocker-ci-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmietzen%2Fdocker-ci-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmietzen%2Fdocker-ci-template/lists"}