Explorar el Código

fix workflow about version tag

Stille hace 3 años
padre
commit
3df1a05446
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  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