if [[ "${{ github.ref_type }}" == "branch" && "${{ github.ref_name }}" != "main" && "${{ github.ref_name }}" != "master" ]]; then # Fetch tags from remote for this specific commit to check if it's being tagged simultaneously TAGS=$(git ls-remote --tags origin | grep "${{ github.sha }}" || true) if [[ -n "$TAGS" ]]; then echo "Dieser Commit hat einen Tag! Überspringe Preview-Deployment, damit der Tag-Deploy Vorrang hat." echo "target=skip" >> $GITHUB_OUTPUT exit 0 fi fi