{"id":28069824,"url":"https://github.com/keptn/gh-action-build-docker-image","last_synced_at":"2025-05-12T19:15:33.387Z","repository":{"id":50157395,"uuid":"331954179","full_name":"keptn/gh-action-build-docker-image","owner":"keptn","description":"GH Action to Build Docker Images with some Keptn-internal improvements","archived":false,"fork":false,"pushed_at":"2021-07-29T09:00:49.000Z","size":19,"stargazers_count":0,"open_issues_count":2,"forks_count":1,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-05-12T19:15:28.495Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","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/keptn.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}},"created_at":"2021-01-22T13:28:23.000Z","updated_at":"2023-03-29T12:53:12.000Z","dependencies_parsed_at":"2022-09-13T06:50:19.094Z","dependency_job_id":null,"html_url":"https://github.com/keptn/gh-action-build-docker-image","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/keptn%2Fgh-action-build-docker-image","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keptn%2Fgh-action-build-docker-image/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keptn%2Fgh-action-build-docker-image/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keptn%2Fgh-action-build-docker-image/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/keptn","download_url":"https://codeload.github.com/keptn/gh-action-build-docker-image/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253805846,"owners_count":21967054,"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":[],"created_at":"2025-05-12T19:15:32.817Z","updated_at":"2025-05-12T19:15:33.372Z","avatar_url":"https://github.com/keptn.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GH Action to Build Docker Images (with some Keptn internal stuff)\n![GitHub release (latest by date)](https://img.shields.io/github/v/release/keptn/gh-action-build-docker-image)\n\nThis repo provides a utility GitHub action for the [CI Workflow](https://github.com/keptn/keptn/tree/master/.github/workflows) in the [Keptn Project](https://github.com/keptn). Nevertheless, this action provides a very basic functionality, as in \"Build a docker image and do some sanity checks\".\n\n## Inputs\n\n* `IMAGE_NAME` - name of the image (including the docker organization)\n* `DOCKER_FOLDER` (optional, defaults to './') - folder where Dockerfile is in; needs a trailing slash\n* `VERSION` - semantic version used as the tag for the resulting image\n* `DATETIME` (optional) - in case you want to build multiple images and refer to them with the same datetime string, e.g., YYYYMMDDHHmmss; (defaults to `DATETIME=$(date +'%Y%m%d%H%M')`) \n* `FILE` (optional, defaults to 'Dockerfile') - name of the Dockerfile\n\n## Outputs\n\nNone at the moment\n\n## Example usage\n\n### Simple Example\n\n```\n    env:\n      VERSION: \"1.2.3\"\n    steps:\n      - name: Checkout Code\n        uses: actions/checkout@v2\n\n      - id: docker_login\n        name: Docker Login\n        uses: docker/login-action@v1\n        with:\n          username: ${{ secrets.REGISTRY_USER }}\n          password: ${{ secrets.REGISTRY_PASSWORD }}\n\n      - id: docker_build\n        name: Docker Build\n        uses: keptn/gh-action-build-docker-image@master\n        with:\n          PLATFORMS: ${{ env.DOCKER_PLATFORMS }}\n          VERSION: ${{ env.VERSION }}\n          IMAGE_NAME: \"yourdockerorg/yourimagename\"\n```\n\n### Extended Example\n\n```\n    env:\n      VERSION: \"1.2.3\"\n    steps:\n      - name: Checkout Code\n        uses: actions/checkout@v2\n\n      - id: docker_login\n        name: Docker Login\n        # only run docker login on pushes; also for PRs, but only if this is not a fork\n        if: (github.event_name == 'push') || (github.event.pull_request.head.repo.full_name == github.repository)\n        # note: GH does not allow to access secrets for PRs from a forked repositories due to security reasons\n        # that's fine, but it means we can't push images to dockerhub\n        uses: docker/login-action@v1\n        with:\n          username: ${{ secrets.REGISTRY_USER }}\n          password: ${{ secrets.REGISTRY_PASSWORD }}\n\n      - id: docker_build\n        name: Docker Build\n        uses: keptn/gh-action-build-docker-image@master\n        with:\n          PLATFORMS: \"linux/amd64,linux/arm/v7,linux/arm64\"\n          VERSION: ${{ env.VERSION }}\n          IMAGE_NAME: \"yourdockerorg/yourimagename\"\n          DOCKER_FOLDER: \"your-sub-directory/\"\n          FILE: \"your-dockerfile.Dockerfile\"\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkeptn%2Fgh-action-build-docker-image","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkeptn%2Fgh-action-build-docker-image","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkeptn%2Fgh-action-build-docker-image/lists"}