summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Kuryloski <kuryloskip@vmware.com>2021-10-04 11:08:22 +0200
committerPhilip Kuryloski <kuryloskip@vmware.com>2021-10-04 11:08:22 +0200
commitaefb298021f165110d96e03ea610be10df133aef (patch)
tree983d40940442295160a66e0f90016210807c9491
parentcccd1e151cf9883637318a99b2aa8ba1af88dcf0 (diff)
downloadrabbitmq-server-git-aefb298021f165110d96e03ea610be10df133aef.tar.gz
Avoid force pushing in update-rbe-images workflow
The standard behavior of the action used in this automation is to force push the branch if already exists. In this case we will just short circuit our workflow. It will mean that the action can no longer automatically close the PR if the diff has converged to zero, but that seems worth the tradeoff.
-rw-r--r--.github/workflows/update-rbe-images.yaml7
1 files changed, 7 insertions, 0 deletions
diff --git a/.github/workflows/update-rbe-images.yaml b/.github/workflows/update-rbe-images.yaml
index e602caab24..9b06d62aa9 100644
--- a/.github/workflows/update-rbe-images.yaml
+++ b/.github/workflows/update-rbe-images.yaml
@@ -22,7 +22,13 @@ jobs:
steps:
- name: CHECKOUT REPOSITORY
uses: actions/checkout@v2.3.4
+ - name: SKIP IF THE PR ALREADY EXISTS
+ id: check-for-branch
+ run: |
+ c=$(git ls-remote --exit-code --heads origin bump-rbe-image-${{ matrix.short_version }})
+ echo "::set-output name=c::$c"
- name: UPDATE RBE IMAGE SHA
+ if: steps.check-for-branch.c != 0
env:
IMAGE: pivotalrabbitmq/rabbitmq-server-buildenv
TAG: linux-erlang-${{ matrix.erlang_version }}
@@ -37,6 +43,7 @@ jobs:
"dict_set exec_properties container-image:docker://${IMAGE}@${DIGEST}" \
//:erlang_${{ matrix.short_version }}_platform || test $? -eq 3
- name: CREATE PULL REQUEST
+ if: steps.check-for-branch.c != 0
uses: peter-evans/create-pull-request@v3
with:
token: ${{ secrets.REPO_SCOPED_TOKEN }}