Skip to content

Commit

Permalink
Merge pull request adobe#52 from shanejbrown/main
Browse files Browse the repository at this point in the history
Add version to published docker image
  • Loading branch information
shanejbrown authored Jul 27, 2023
2 parents ff32b8a + b897966 commit 4b64d86
Show file tree
Hide file tree
Showing 2 changed files with 8 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 )" >> $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
4 changes: 1 addition & 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 Down Expand Up @@ -90,7 +90,6 @@ 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}')
return existing_version

# Generate the version from the base version and the git commit number, then store it in the file
Expand All @@ -110,7 +109,6 @@ def get_version():
output = stdout.strip()
if cmd.returncode == 0:
new_version = '{0}.{1}'.format(BASE_VERSION, output)
print(f'Setting version to {new_version}')

# write the version file
if os.path.exists(BUILDRUNNER_DIR):
Expand Down

0 comments on commit 4b64d86

Please sign in to comment.