diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 286a9c11..e15677c3 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -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: diff --git a/setup.py b/setup.py index f2a2fc6c..0354b121 100644 --- a/setup.py +++ b/setup.py @@ -1,5 +1,5 @@ """ -Copyright (C) 2020 Adobe +Copyright (C) 2023 Adobe """ from __future__ import print_function @@ -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 @@ -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):