Skip to content

Commit 6f50de7

Browse files
committed
fix tag with version
1 parent 7a8eaad commit 6f50de7

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

.github/workflows/docker-build.yaml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,20 @@ jobs:
2424
- name: Build Image Name
2525
id: build-image-name
2626
# TODO: going to both ENV and OUTPUTS is probably redundant
27-
run: |
28-
echo DOCKER_IMAGE_NAME=devdull/$(echo ${{ github.event.repository.name }} | tr '[A-Z]' '[a-z]') | tee -a $GITHUB_ENV | tee -a $GITHUB_OUTPUT
29-
echo CODELINE=$(echo ${{ github.ref_name }} | tr '[A-Z]' '[a-z]') | tee -a $GITHUB_ENV | tee -a $GITHUB_OUTPUT
30-
echo INSTANCE_NAME=${{ github.ref_name }}_InT | tee -a $GITHUB_ENV | tee -a $GITHUB_OUTPUT
31-
32-
- name: Set Version
3327
run: |
3428
version=$(cat pyterrabacktyl.py | grep __version__ | tr -d "[a-zA-Z ='_]")
35-
echo "VERSION=${version}" | tee -a $GITHUB_ENV | tee -a $GITHUB_OUTPUT
29+
30+
# Seems like GITHUB_ENV value can be changed, but value in GITHUB_OUTPUT can NOT
3631
if [ github.ref_name != 'main' ]; then
3732
echo "CODELINE=${{ github.ref_name }}_${version}" | tee -a $GITHUB_ENV | tee -a $GITHUB_OUTPUT
33+
else
34+
echo CODELINE=$(echo ${{ github.ref_name }} | tr '[A-Z]' '[a-z]') | tee -a $GITHUB_ENV | tee -a $GITHUB_OUTPUT
3835
fi
3936
37+
echo DOCKER_IMAGE_NAME=devdull/$(echo ${{ github.event.repository.name }} | tr '[A-Z]' '[a-z]') | tee -a $GITHUB_ENV | tee -a $GITHUB_OUTPUT
38+
echo INSTANCE_NAME=${{ github.ref_name }}_InT | tee -a $GITHUB_ENV | tee -a $GITHUB_OUTPUT
39+
echo "VERSION=${version}" | tee -a $GITHUB_ENV | tee -a $GITHUB_OUTPUT
40+
4041
- name: Build Docker Image
4142
run: |
4243
docker build . --file Dockerfile --tag ${{ env.DOCKER_IMAGE_NAME }}:${{ env.CODELINE }}

0 commit comments

Comments
 (0)