Skip to content

Commit

Permalink
docker workflow: add git and build information as build arguments (#63)
Browse files Browse the repository at this point in the history
<!-- Thank you for submitting a pull request to our repository. -->

## Description

Add git and build information as docker build args.

## Changes Made

The following build-args have been added:
- GIT_REV: commit hash
- GIT_VERSION: branch name or tag
- GIT_URL: URL of source repository
- BUILD_DATE: ISO 8601 date and time of build 

## Related Issues

## Checklist

<!-- Please check off the following items by putting an "x" in the box:
-->

- [x] I have used a PR title that is descriptive enough for a release
note.
- [x] I have tested these changes locally.
- [ ] I have added appropriate tests or updated existing tests.
- [ ] I have tested these changes on a dedicated VM or a customer VM
[name of the VM]
- [x] I have added appropriate documentation or updated existing
documentation.

---------

Co-authored-by: chicco785 <[email protected]>
  • Loading branch information
cosimomeli and chicco785 authored Nov 17, 2023
1 parent 3e70fb4 commit 479ffa3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,3 +96,8 @@ jobs:
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
build-args: |
GIT_REV=${{fromJson(steps.meta.outputs.json).labels['org.opencontainers.image.revision']}}
GIT_VERSION=${{fromJson(steps.meta.outputs.json).labels['org.opencontainers.image.version']}}
GIT_URL=${{fromJson(steps.meta.outputs.json).labels['org.opencontainers.image.source']}}
BUILD_DATE=${{fromJson(steps.meta.outputs.json).labels['org.opencontainers.image.created']}}
4 changes: 3 additions & 1 deletion RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
# github-workflows Release Notes

## 0.0.2-dev - 2023-10-18
## 0.0.2-dev - 2023-11-17

### Features

- docker workflow: add git and build information as build arguments (PR #63 by
@cosimomeli)
- add workflow to support license management (PR #58 by @chicco785)
- docker workflow: add `pre-build` step (PR #57 by @cosimomeli)
- markdown workflow: add optional spell checker (PR #44 by @chicco785)
Expand Down

0 comments on commit 479ffa3

Please sign in to comment.