Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Push docker latest if is release #5

Merged
merged 1 commit into from
Dec 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ jobs:
docker push "${IMAGE_NAME_WITH_TAG_VERSION}"

# Push latest if required
if [[ "${IMAGE_NAME_WITH_TAG_LATEST}" != "${IMAGE_NAME_WITH_TAG_LATEST}" ]]; then
if [[ "${DOCKER_TAG_LATEST}" == "latest" ]]; then
docker tag "${{ env.DOCKER_USERNAME }}/${{ env.IMAGE_NAME }}:latest" "${{ env.DOCKER_USERNAME }}/${{ env.IMAGE_NAME }}:latest"
docker push "${IMAGE_NAME_WITH_TAG_LATEST}"
fi

Expand Down
3 changes: 0 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,12 @@ RUN apk add --no-cache git \
################################################################
FROM python:3.12-alpine

ENV PYGITVER_TEMPLATE_CHANGELOG="/pygitver/templates/changelog.tmpl"
ENV PYGITVER_TEMPLATE_CHANGELOG_COMMON="/pygitver/templates/changelog-common.tmpl"
ENV PYGITVER_ROOT="/pygitver"

# Install dependencies
RUN apk add --no-cache git openssh

# Copy application code and
COPY ./src/pygitver/templates /pygitver/templates
COPY ./src/pygitver/scripts /pygitver/scripts
COPY --from=build /opt/venv /opt/venv

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "pygitver"
version = "0.1.0"
version = "0.1.1"
authors = [
{ name="Yurii Puchkov", email="[email protected]" },
]
Expand Down
2 changes: 1 addition & 1 deletion src/pygitver/git.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class GitError(Exception):


class Git:
__version__ = "0.1.0"
__version__ = "0.1.1"

@staticmethod
def _cmd(command: str) -> str:
Expand Down