Skip to content

Commit 8915daf

Browse files
authored
remote-copy.yml: Made cd failure case more explicit (#20)
1 parent da0b65b commit 8915daf

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

.github/workflows/remote-copy.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,12 @@ jobs:
262262
$(gpgconf --list-dirs libexecdir)/gpg-preset-passphrase \
263263
--passphrase '${{ secrets.GH_ACTIONS_BOT_GPG_PASSPHRASE }}' \
264264
--preset '${{ secrets.GH_ACTIONS_BOT_GPG_KEYGRIP }}'
265-
cd "${{ vars.CONFIGS_INPUT_DIR }}" || echo "::error::Can't CD into vars.CONFIGS_INPUT_DIR to commit" && exit 2
265+
266+
if ! cd "${{ vars.CONFIGS_INPUT_DIR }}"; then
267+
echo "::error::Can't CD into vars.CONFIGS_INPUT_DIR to commit"
268+
exit 2
269+
fi
270+
266271
git add .
267272
git commit -m "Updated manifests as part of ${{ env.RUN_URL }}"
268273
git push

0 commit comments

Comments
 (0)