diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 30bdd56723..c8415d296a 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -29,8 +29,11 @@ jobs: steps: - name: set branch_name # Some integrations (Dependabot & Snyk) build very long branch names. This is a switch to make long branch names shorter. run: | - if [[ "$GITHUB_REF" =~ ^refs/heads/dependabot/.* ]] || [[ "$GITHUB_REF" =~ ^refs/remotes/origin/snyk-upgrade-* ]] || [[ "$GITHUB_REF" =~ ^refs/remotes/origin/snyk-fix-* ]]; then - echo "branch_name=`echo ${GITHUB_REF#refs/heads/} | md5sum | head -c 10 | sed 's/^/x/'`" >> $GITHUB_ENV + echo "GITHUB_REF=${GITHUB_REF}" + if [[ "$GITHUB_REF" =~ ^refs/heads/dependabot/.* ]]; then + echo "branch_name=`echo ${GITHUB_REF##*/*-} | md5sum | head -c 10 | sed 's/^/x/'`" >> $GITHUB_ENV + elif [[ "$GITHUB_REF" =~ ^refs/.*/snyk-* ]]; then + echo "branch_name=`echo ${GITHUB_REF##*/*-} | head -c 10 | sed 's/^/s/'`" >> $GITHUB_ENV else echo "branch_name=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV fi