Skip to content

Commit 6df72b3

Browse files
Set the remote url (in memory) if a push is needed (#305)
This is meant to address the failure that's coming from using `persist-credentials: false` without providing alternate configuration. ``` [dependabot/npm_and_yarn/actions/core-1.11.1 eb45021] [dependabot skip] Update dist/ with compiled dependencies 3 files changed, 0 insertions(+), 0 deletions(-) fatal: could not read Username for 'https://github.com/': No such device or address ```
1 parent 38df4b8 commit 6df72b3

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

.github/workflows/compile-dependabot-updates.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,4 +62,9 @@ jobs:
6262
git config user.name "github-actions[bot]"
6363
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
6464
git add dist/
65-
git commit -m "[dependabot skip] Update dist/ with compiled dependencies" && git push || exit 0
65+
if git commit -m "[dependabot skip] Update dist/ with compiled dependencies"; then
66+
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git
67+
git push
68+
else
69+
echo "No changes to commit"
70+
fi

0 commit comments

Comments
 (0)