-
Notifications
You must be signed in to change notification settings - Fork 0
Using images in GitHub Actions
Andrew Hosgood edited this page Oct 14, 2024
·
3 revisions
Use the Docker build scripts in your GitHub Actions to build images.
This script:
- runs the
Dockerfile
through hadolint ignoring rulesDL3045
andDL3007
- builds the image and tags it with the provided version
- optionally tags the image with
latest
- pushes the image to the container repository of the current project
The get-version-tag
GitHub Action will provide you with a version tag to use for your images:
The version tag returned will be:
- a generated calver version number if the branch is
main
(e.g.24.06.21.123
) - the branch name (with slashes replaced with hyphens) for workflows triggered by pushes (e.g.
fix-a11y
orfeature-new-components
) - the semver version number of the release for workflows triggered by tags with any prefixed
v
removed (e.g.1.2.3
for the tagv1.2.3
and4
for the tagv4
)