diff --git a/.github/workflows/release-generate-ci-template.yaml b/.github/workflows/release-generate-ci-template.yaml index f3d9a317..6295d6ae 100644 --- a/.github/workflows/release-generate-ci-template.yaml +++ b/.github/workflows/release-generate-ci-template.yaml @@ -89,8 +89,7 @@ jobs: remote_exists=$(git ls-remote --heads fork "$branch") if [ -z "$remote_exists" ]; then # remote doesn't exist. - git push "https://serverless-qe:${GH_TOKEN}@github.com/serverless-qe/release.git" "$branch:$branch" -f - exit $? + git push "https://serverless-qe:${GH_TOKEN}@github.com/serverless-qe/release.git" "$branch:$branch" -f || exit 1 fi git fetch fork "$branch" if git diff --quiet "fork/$branch" "$branch"; then @@ -113,8 +112,7 @@ jobs: remote_exists=$(git ls-remote --heads fork "$branch") if [ -z "$remote_exists" ]; then # remote doesn't exist. - git push "https://serverless-qe:${GH_TOKEN}@github.com/serverless-qe/hack.git" "$branch:$branch" -f - exit $? + git push "https://serverless-qe:${GH_TOKEN}@github.com/serverless-qe/hack.git" "$branch:$branch" -f || exit 1 fi git fetch fork "$branch" if git diff --quiet "fork/$branch" "$branch"; then diff --git a/.github/workflows/release-generate-ci.yaml b/.github/workflows/release-generate-ci.yaml index 501a1470..c10838d9 100644 --- a/.github/workflows/release-generate-ci.yaml +++ b/.github/workflows/release-generate-ci.yaml @@ -153,8 +153,7 @@ jobs: remote_exists=$(git ls-remote --heads fork "$branch") if [ -z "$remote_exists" ]; then # remote doesn't exist. - git push "https://serverless-qe:${GH_TOKEN}@github.com/serverless-qe/release.git" "$branch:$branch" -f - exit $? + git push "https://serverless-qe:${GH_TOKEN}@github.com/serverless-qe/release.git" "$branch:$branch" -f || exit 1 fi git fetch fork "$branch" if git diff --quiet "fork/$branch" "$branch"; then @@ -176,8 +175,7 @@ jobs: remote_exists=$(git ls-remote --heads fork "$branch") if [ -z "$remote_exists" ]; then # remote doesn't exist. - git push "https://serverless-qe:${GH_TOKEN}@github.com/serverless-qe/hack.git" "$branch:$branch" -f - exit $? + git push "https://serverless-qe:${GH_TOKEN}@github.com/serverless-qe/hack.git" "$branch:$branch" -f || exit 1 fi git fetch fork "$branch" if git diff --quiet "fork/$branch" "$branch"; then @@ -202,8 +200,7 @@ jobs: remote_exists=$(git ls-remote --heads fork "$branch") if [ -z "$remote_exists" ]; then # remote doesn't exist. - git push "https://serverless-qe:${GH_TOKEN}@github.com/serverless-qe/$repo.git" "$branch:$branch" -f - exit $? + git push "https://serverless-qe:${GH_TOKEN}@github.com/serverless-qe/$repo.git" "$branch:$branch" -f || exit 1 fi git fetch fork "$branch" if git diff --quiet "fork/$branch" "$branch"; then @@ -227,8 +224,7 @@ jobs: remote_exists=$(git ls-remote --heads fork "$branch") if [ -z "$remote_exists" ]; then # remote doesn't exist. - git push "https://serverless-qe:${GH_TOKEN}@github.com/serverless-qe/$repo.git" "$branch:$branch" -f - exit $? + git push "https://serverless-qe:${GH_TOKEN}@github.com/serverless-qe/$repo.git" "$branch:$branch" -f || exit 1 fi git fetch fork "$branch" if git diff --quiet "fork/$branch" "$branch"; then @@ -252,8 +248,7 @@ jobs: remote_exists=$(git ls-remote --heads fork "$branch") if [ -z "$remote_exists" ]; then # remote doesn't exist. - git push "https://serverless-qe:${GH_TOKEN}@github.com/serverless-qe/$repo.git" "$branch:$branch" -f - exit $? + git push "https://serverless-qe:${GH_TOKEN}@github.com/serverless-qe/$repo.git" "$branch:$branch" -f || exit 1 fi git fetch fork "$branch" if git diff --quiet "fork/$branch" "$branch"; then @@ -277,8 +272,7 @@ jobs: remote_exists=$(git ls-remote --heads fork "$branch") if [ -z "$remote_exists" ]; then # remote doesn't exist. - git push "https://serverless-qe:${GH_TOKEN}@github.com/serverless-qe/$repo.git" "$branch:$branch" -f - exit $? + git push "https://serverless-qe:${GH_TOKEN}@github.com/serverless-qe/$repo.git" "$branch:$branch" -f || exit 1 fi git fetch fork "$branch" if git diff --quiet "fork/$branch" "$branch"; then @@ -302,8 +296,7 @@ jobs: remote_exists=$(git ls-remote --heads fork "$branch") if [ -z "$remote_exists" ]; then # remote doesn't exist. - git push "https://serverless-qe:${GH_TOKEN}@github.com/serverless-qe/$repo.git" "$branch:$branch" -f - exit $? + git push "https://serverless-qe:${GH_TOKEN}@github.com/serverless-qe/$repo.git" "$branch:$branch" -f || exit 1 fi git fetch fork "$branch" if git diff --quiet "fork/$branch" "$branch"; then @@ -327,8 +320,7 @@ jobs: remote_exists=$(git ls-remote --heads fork "$branch") if [ -z "$remote_exists" ]; then # remote doesn't exist. - git push "https://serverless-qe:${GH_TOKEN}@github.com/serverless-qe/$repo.git" "$branch:$branch" -f - exit $? + git push "https://serverless-qe:${GH_TOKEN}@github.com/serverless-qe/$repo.git" "$branch:$branch" -f || exit 1 fi git fetch fork "$branch" if git diff --quiet "fork/$branch" "$branch"; then @@ -352,8 +344,7 @@ jobs: remote_exists=$(git ls-remote --heads fork "$branch") if [ -z "$remote_exists" ]; then # remote doesn't exist. - git push "https://serverless-qe:${GH_TOKEN}@github.com/serverless-qe/$repo.git" "$branch:$branch" -f - exit $? + git push "https://serverless-qe:${GH_TOKEN}@github.com/serverless-qe/$repo.git" "$branch:$branch" -f || exit 1 fi git fetch fork "$branch" if git diff --quiet "fork/$branch" "$branch"; then @@ -377,8 +368,7 @@ jobs: remote_exists=$(git ls-remote --heads fork "$branch") if [ -z "$remote_exists" ]; then # remote doesn't exist. - git push "https://serverless-qe:${GH_TOKEN}@github.com/serverless-qe/$repo.git" "$branch:$branch" -f - exit $? + git push "https://serverless-qe:${GH_TOKEN}@github.com/serverless-qe/$repo.git" "$branch:$branch" -f || exit 1 fi git fetch fork "$branch" if git diff --quiet "fork/$branch" "$branch"; then @@ -402,8 +392,7 @@ jobs: remote_exists=$(git ls-remote --heads fork "$branch") if [ -z "$remote_exists" ]; then # remote doesn't exist. - git push "https://serverless-qe:${GH_TOKEN}@github.com/serverless-qe/$repo.git" "$branch:$branch" -f - exit $? + git push "https://serverless-qe:${GH_TOKEN}@github.com/serverless-qe/$repo.git" "$branch:$branch" -f || exit 1 fi git fetch fork "$branch" if git diff --quiet "fork/$branch" "$branch"; then diff --git a/pkg/action/update_action.go b/pkg/action/update_action.go index 1dbbb6d2..cc7f611a 100644 --- a/pkg/action/update_action.go +++ b/pkg/action/update_action.go @@ -141,8 +141,7 @@ git remote add fork "https://github.com/serverless-qe/$repo.git" || true # ignor remote_exists=$(git ls-remote --heads fork "$branch") if [ -z "$remote_exists" ]; then # remote doesn't exist. - git push "https://serverless-qe:${GH_TOKEN}@github.com/serverless-qe/$repo.git" "$branch:$branch" -f - exit $? + git push "https://serverless-qe:${GH_TOKEN}@github.com/serverless-qe/$repo.git" "$branch:$branch" -f || exit 1 fi git fetch fork "$branch" if git diff --quiet "fork/$branch" "$branch"; then