Skip to content

Commit

Permalink
Add version to published docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
Shane Brown committed Jul 27, 2023
1 parent ff32b8a commit 0b67f21
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,14 +96,18 @@ jobs:
with:
# Fetch all history instead of the latest commit
fetch-depth: 0
- name: Get and set version in env
run: echo "CURRENT_VERSION=$( python setup.py --version | tr -d '\n' )" >> $GITHUB_ENV
- name: Print current version
run: echo CURRENT_VERSION ${{ env.CURRENT_VERSION }}
- name: Docker Tags
id: docker_tags
uses: docker/metadata-action@v3
with:
images: ghcr.io/adobe/buildrunner
# Always include latest tag
flavor: |
latest=true
tags: |
latest
${{ env.CURRENT_VERSION }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
with:
Expand Down
5 changes: 2 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
Copyright (C) 2020 Adobe
Copyright (C) 2023 Adobe
"""

from __future__ import print_function
Expand All @@ -12,7 +12,6 @@

from setuptools import setup, find_packages


BASE_VERSION = '3.0'

SOURCE_DIR = os.path.dirname(
Expand Down Expand Up @@ -90,7 +89,7 @@ def get_version():
version_mod = types.ModuleType(loader.name)
loader.exec_module(version_mod)
existing_version = version_mod.__version__ # pylint: disable=no-member
print(f'Using existing buildrunner version: {existing_version}')
# print(f'Using existing buildrunner version: {existing_version}')
return existing_version

# Generate the version from the base version and the git commit number, then store it in the file
Expand Down

0 comments on commit 0b67f21

Please sign in to comment.