From b001f3f17c988ac9936ac6133ced15e5afa2ddee Mon Sep 17 00:00:00 2001 From: Keijo Raamat Date: Thu, 30 Sep 2021 15:30:23 +0300 Subject: [PATCH] Set tag --- .github/workflows/build_base_image.yml | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build_base_image.yml b/.github/workflows/build_base_image.yml index 9e570f2..74b8d73 100644 --- a/.github/workflows/build_base_image.yml +++ b/.github/workflows/build_base_image.yml @@ -15,7 +15,7 @@ jobs: - uses: actions/checkout@v2 - - name: Set image tag + - name: Get versions shell: python run: | import os @@ -26,10 +26,20 @@ jobs: (key, val) = line.split() versions[key] = val except: - print("Something is not right") - print("internetee/erlang-ruby:" + versions["erlang"] + "-" + versions["ruby"]) - print(os.environ) - #echo "TAG=internetee/erlang-ruby:'$ERLANG_VER'-'$RUBY_VER'" >> $GITHUB_ENV + print("Something is off with getting the versions") + tag = "internetee/erlang-ruby:" + versions["erlang"] + "-" + versions["ruby"] + try: + f = open("TAG", "x") + f.write(tag) + except: + print("Something is not right with setting the tag") + finally: + f.close() + + - name: Set image tag" + run: | + TAG = `cat TAG` + echo "TAG=internetee/erlang-ruby:'$ERLANG_VER'-'$RUBY_VER'" >> $GITHUB_ENV - name: Build image run: |