{"id":27160983,"url":"https://github.com/flownative/action-docker-build","last_synced_at":"2025-11-07T13:03:47.043Z","repository":{"id":65159803,"uuid":"232061819","full_name":"flownative/action-docker-build","owner":"flownative","description":"A Github action which builds a Docker image with support for dynamic build args","archived":false,"fork":false,"pushed_at":"2020-03-23T06:52:50.000Z","size":32,"stargazers_count":10,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-21T06:02:21.427Z","etag":null,"topics":["actions","docker","github-actions","release-automation"],"latest_commit_sha":null,"homepage":"","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/flownative.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":"2020-01-06T08:58:02.000Z","updated_at":"2022-08-15T11:48:39.000Z","dependencies_parsed_at":"2023-01-05T05:03:44.697Z","dependency_job_id":null,"html_url":"https://github.com/flownative/action-docker-build","commit_stats":{"total_commits":26,"total_committers":1,"mean_commits":26.0,"dds":0.0,"last_synced_commit":"dec04e020f7d905a9fb8127099b82e4c8c831620"},"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flownative%2Faction-docker-build","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flownative%2Faction-docker-build/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flownative%2Faction-docker-build/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flownative%2Faction-docker-build/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/flownative","download_url":"https://codeload.github.com/flownative/action-docker-build/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247947857,"owners_count":21023066,"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":["actions","docker","github-actions","release-automation"],"created_at":"2025-04-09T00:08:27.924Z","updated_at":"2025-11-07T13:03:42.000Z","avatar_url":"https://github.com/flownative.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![MIT license](http://img.shields.io/badge/license-MIT-brightgreen.svg)](http://opensource.org/licenses/MIT)\n[![Maintenance level: Love](https://img.shields.io/badge/maintenance-%E2%99%A1%E2%99%A1%E2%99%A1-ff69b4.svg)](https://www.flownative.com/en/products/open-source.html)\n\n# Docker Image Build Github Action\n\nThis Github action builds a Docker image based on a given Git tag\nreference. The Git tag must start with a \"v\" prefix, for example\n\"v1.23.4+5\"\n\nIt's also possible to provide a script which can dynamically set\nenvironment variables which are then used as build arguments. That way\nyou can retrieve a version number of a specific dependency via a web\nservice or URL and pass the information to your Dockerfile.\n\n## Example workflow\n\n````yaml\nname: Build and release Docker images\non:\n  push:\n    branches-ignore:\n      - '**'\n    tags:\n      - 'v*.*.*'\n\njobs:\n  build:\n    runs-on: ubuntu-latest\n    steps:\n\n      - uses: actions/checkout@v2\n        with:\n          fetch-depth: 1\n\n      - name: Build Docker image\n        uses: flownative/action-docker-build@v1\n        with:\n          tag_ref: ${{ github.ref }}\n          image_name: flownative/docker-base/base\n          registry_password: ${{ secrets.GITHUB_TOKEN }}\n````\n## Inputs\n\nThe following inputs are used by this action:\n\n- `tag_ref`: The full Git tag reference. This must be a semver tag ref\n  of an existing tagged image. For example, `refs/tags/v1.2.5+12`\n- `git_sha`: The SHA hash of the Git commit being used for the build. If\n  set, this value is used as a label for the resulting Docker image\n- `git_repository_url`: The URL leading to the Git repository. If set,\n  this value is used as a label for the resulting Docker image\n- `image_name`: The image name to build, without tag. For example,\n  `flownative/docker-magic-image/magic-image`\n- `image_tag`: The image tag to build. If empty, the tag is derived from\n  `tag_ref`: e.g. `v1.2.5`\n- `registry_password`: Password / token for the Github Docker image\n  registry\n\n## Outputs\n\nAfter a successful run, the action provides your workflow with the\nfollowing outputs:\n\n- `image_name`: The name of the Docker image, which was built and pushed\n- `image_tag`: The tag of the Docker image, which was built and pushed\n- `git_tag`: The tag of the Git commit, which was discovered during the\n  process\n\n## Docker image labels\n\nThis action automatically sets a couple of labels in the built Docker\nimage. This metadata may help you and others identifying the state of\nsource code used at build time.\n\nThe following labels are set:\n\n- `org.label-schema.version`: set to the image tag\n- `org.label-schema.build-date`: set to the current date and time during\n  the build\n- `org.label-schema.vcs-url`: set to to the Git repository URL\n- `org.label-schema.vcs-ref`: set to the SHA of the current Git commit\n\nHint: You can review the image labels by running `docker inspect`.\n\n## Dynamic build arguments\n\nIf the following file is present as `.github/workflows/build-env.sh`,\nits exported environment environment variables (you can provide multiple\nones) will be parsed ...\n\n````bash\nBUILD_ARG_MICRO_VERSION=$(wget -qO- https://versions.flownative.io/projects/base/channels/stable/versions/micro.txt)\nexport BUILD_ARG_MICRO_VERSION\n````\n\n... and can be used in a Dockerfile as build arguments as such:\n\n```Dockerfile\n…\nARG MICRO_VERSION\nENV MICRO_VERSION=${MICRO_VERSION}\nRUN wget --no-hsts https://github.com/zyedidia/micro/releases/download/v${MICRO_VERSION}/micro-${MICRO_VERSION}-linux64.tar.gz; \\\n    tar xfz micro-${MICRO_VERSION}-linux64.tar.gz; \\\n    mv micro-${MICRO_VERSION}/micro /usr/local/bin; \\\n    chmod 755 /usr/local/bin/micro; \\\n    rm -rf micro-${MICRO_VERSION}* /var/log/* /var/lib/dpkg/status-old\n…\n```\n\n## Implementation Note\n\nThe repository of this action does not contain the actual implementation\ncode. Instead, it's referring to a pre-built image in its `Dockerfile`\nin order to save resources and speed up workflow runs.\n\nThe code of this action can be found\n[here](https://github.com/flownative/docker-action-docker-build).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflownative%2Faction-docker-build","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflownative%2Faction-docker-build","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflownative%2Faction-docker-build/lists"}