Skip to content

Commit 1ad2452

Browse files
committed
Fixup workflow syntax for update-* workflows
1 parent aefb298 commit 1ad2452

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

.github/workflows/update-otp-for-oci.yaml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,11 @@ jobs:
2222
- name: SKIP IF THE PR ALREADY EXISTS
2323
id: check-for-branch
2424
run: |
25-
c=$(git ls-remote --exit-code --heads origin bump-otp-for-oci)
26-
echo "::set-output name=c::$c"
25+
set +e
26+
git ls-remote --exit-code --heads origin bump-otp-for-oci
27+
echo "::set-output name=c::$?"
2728
- name: DETERMINE LATEST PATCH & SHA
28-
if: steps.check-for-branch.c != 0
29+
if: steps.check-for-branch.outputs.c != 0
2930
id: fetch-version
3031
run: |
3132
TAG_NAME=$(curl -s GET https://api.github.com/repos/erlang/otp/tags \
@@ -37,7 +38,7 @@ jobs:
3738
echo "::set-output name=VERSION::${TAG_NAME#OTP-}"
3839
echo "::set-output name=SHA::${SHA}"
3940
- name: MODIFY VERSION FILE
40-
if: steps.check-for-branch.c != 0
41+
if: steps.check-for-branch.outputs.c != 0
4142
run: |
4243
echo "Updating packaging/docker-image/${{ matrix.image_tag_suffix }}.yaml with:"
4344
echo " otp -> ${{ steps.fetch-version.outputs.VERSION }}"
@@ -50,7 +51,7 @@ jobs:
5051
set -x
5152
git diff
5253
- name: CREATE PULL REQUEST
53-
if: steps.check-for-branch.c != 0
54+
if: steps.check-for-branch.outputs.c != 0
5455
uses: peter-evans/create-pull-request@v3
5556
with:
5657
token: ${{ secrets.REPO_SCOPED_TOKEN }}

.github/workflows/update-rbe-images.yaml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,11 @@ jobs:
2525
- name: SKIP IF THE PR ALREADY EXISTS
2626
id: check-for-branch
2727
run: |
28-
c=$(git ls-remote --exit-code --heads origin bump-rbe-image-${{ matrix.short_version }})
29-
echo "::set-output name=c::$c"
28+
set +e
29+
git ls-remote --exit-code --heads origin bump-rbe-image-${{ matrix.short_version }}
30+
echo "::set-output name=c::$?"
3031
- name: UPDATE RBE IMAGE SHA
31-
if: steps.check-for-branch.c != 0
32+
if: steps.check-for-branch.outputs.c != 0
3233
env:
3334
IMAGE: pivotalrabbitmq/rabbitmq-server-buildenv
3435
TAG: linux-erlang-${{ matrix.erlang_version }}
@@ -43,7 +44,7 @@ jobs:
4344
"dict_set exec_properties container-image:docker://${IMAGE}@${DIGEST}" \
4445
//:erlang_${{ matrix.short_version }}_platform || test $? -eq 3
4546
- name: CREATE PULL REQUEST
46-
if: steps.check-for-branch.c != 0
47+
if: steps.check-for-branch.outputs.c != 0
4748
uses: peter-evans/create-pull-request@v3
4849
with:
4950
token: ${{ secrets.REPO_SCOPED_TOKEN }}

0 commit comments

Comments
 (0)