Browse Source

fix workflow about version tag

Stille 3 years ago
parent
commit
3df1a05446
1 changed files with 2 additions and 2 deletions
  1. 2 2
      .github/workflows/docker-build-release.yml

+ 2 - 2
.github/workflows/docker-build-release.yml

@@ -18,8 +18,8 @@ jobs:
       - name: Set tag
         id: tag
         run: |
-          if [[ -n $(cat ${{ github.event.inputs.project }}/Dockerfile | awk '{if($1~"ENV" && $2=="VERSION")print $3}') ]]; then
-            VERSION=$(cat ${{ github.event.inputs.project }}/Dockerfile | awk '{if($1~"ENV" && $2=="VERSION")print $3}')
+          if [[ -n $(cat ${{ github.event.inputs.project }}/Dockerfile | awk '{if($1~"ENV" && $2~"VERSION")print $3;exit;}') ]]; then
+            VERSION=$(cat ${{ github.event.inputs.project }}/Dockerfile | awk '{if($1~"ENV" && $2~"VERSION")print $3;exit;}')
             echo "tag=$VERSION" >> $GITHUB_ENV
           else
             echo "tag=$(date +%Y)-$(date +%m)-$(date +%d)" >> $GITHUB_ENV