Skip to content

Commit

Permalink
Fix forming Docker image version tags
Browse files Browse the repository at this point in the history
Additionally:
- restore more precise `org.opencontainers.image.version` Docker image annotation
  • Loading branch information
tyranron committed Jul 27, 2022
1 parent 0c8c5b3 commit 93309e5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ jobs:
if ('${{ steps.semver.outputs.group3 }}' !== '0') {
versions += ',${{ steps.semver.outputs.group3 }}';
}
versions += 'latest';
versions += ',latest';
}
return versions;
if: ${{ steps.skip.outputs.no == 'true'
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ COPY lib/ /app/lib/
COPY src/ /app/src/

# Build project distribution binary.
# TODO: use --out-dir once stabilized
# TODO: https://github.com/rust-lang/cargo/issues/6790
# TODO: Use `--out-dir` once stabilized:
# https://github.com/rust-lang/cargo/issues/6790
RUN cargo build -p baza ${rustc_opts}

# Prepare project distribution binary and all dependent dynamic libraries.
Expand Down
6 changes: 2 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -210,11 +210,9 @@ docker.image:
--label org.opencontainers.image.source=$(github_url)/$(github_repo) \
--label org.opencontainers.image.revision=$(strip \
$(shell git show --pretty=format:%H --no-patch)) \
--label org.opencontainers.image.version=$(strip $(VERSION)) \
--label org.opencontainers.image.version=$(subst v,,$(strip \
$(shell git describe --tags --dirty --match='v*'))) \
-t $(OWNER)/$(NAME):$(or $(tag),dev) ./
# TODO: Enable after first release.
# --label org.opencontainers.image.version=$(strip \
# $(shell git describe --tags --dirty))


# Manually push project Docker images to container registries.
Expand Down

0 comments on commit 93309e5

Please sign in to comment.