Beautiful Open-Source Form Builder
Update CI/CD workflow to restrict Docker image publishing to version tags only
JhumanJ2acdb9017639
diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.ymlindex 44ae61469..91e906369 100644--- a/.github/workflows/ci-cd.yml+++ b/.github/workflows/ci-cd.yml@@ -307,7 +307,7 @@ jobs:publish-docker-images:name: Push Docker images to Docker Hubneeds: [code_lint, client_lint, tests, build-nuxt-app]- if: ${{ github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')) }}+ if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') }}runs-on: ubuntu-latestpermissions:contents: read@@ -319,10 +319,6 @@ jobs:echo "VERSION=${GITHUB_REF#refs/*/v}" >> $GITHUB_ENVecho "API_TAGS=${{secrets.DOCKER_API_REPO}}:latest,${{secrets.DOCKER_API_REPO}}:${GITHUB_REF#refs/*/v}" >> $GITHUB_ENVecho "UI_TAGS=${{secrets.DOCKER_UI_REPO}}:latest,${{secrets.DOCKER_UI_REPO}}:${GITHUB_REF#refs/*/v}" >> $GITHUB_ENV- else- echo "VERSION=dev" >> $GITHUB_ENV- echo "API_TAGS=${{secrets.DOCKER_API_REPO}}:dev,${{secrets.DOCKER_API_REPO}}:dev-${GITHUB_SHA::7}" >> $GITHUB_ENV- echo "UI_TAGS=${{secrets.DOCKER_UI_REPO}}:dev,${{secrets.DOCKER_UI_REPO}}:dev-${GITHUB_SHA::7}" >> $GITHUB_ENVfi- name: Check out the repo