diff --git a/.github/workflows/build_base_image.yml b/.github/workflows/build_base_image.yml index dd0eb85..8a6f88a 100644 --- a/.github/workflows/build_base_image.yml +++ b/.github/workflows/build_base_image.yml @@ -16,23 +16,20 @@ jobs: - uses: actions/checkout@v2 - name: Set image tag - shell: bash + shell: python run: | - IFS=$'\n' - read -d '' -r -a lines < .tool-versions - erlang_line="${lines[0]}" - ruby_line="${lines[1]}" - echo $erlang_line - echo $ruby_line - echo 'HERE 1' - erlang=(${erlang_line// / }) - echo $erlang - echo 'HERE 2' - ruby=(${ruby_line// / }) - ERLANG_VER=${erlang[1]} - RUBY_VER=${ruby[1]} - echo $ERLANG_VER - echo "TAG=internetee/erlang-ruby:'$ERLANG_VER'-'$RUBY_VER'" >> $GITHUB_ENV + import os + versions = {} + try: + with open(".tool-versions", "r") as f: + for line in f: + (key, val) = line.split() + versions[key] = val + except: + print("Something is not right") + print("internetee/erlang-ruby:" + versions["erlang"] + "-" + versions["ruby"]) + print(os.environ["GITHUB_ENV"]) + #echo "TAG=internetee/erlang-ruby:'$ERLANG_VER'-'$RUBY_VER'" >> $GITHUB_ENV - name: Build image run: |