We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e0c1638 commit 57080e0Copy full SHA for 57080e0
.github/workflows/sync-pr-to-gitlab.yml
@@ -45,12 +45,17 @@ jobs:
45
if [ -z "$GITLAB_REPO_URL" ]; then
46
echo "GITLAB_REPO_URL secret is not set"; exit 1;
47
fi
48
+ if [ -z "$GITLAB_TOKEN" ]; then
49
+ echo "GITLAB_TOKEN secret is not set"; exit 1;
50
+ fi
51
52
git config user.name "github-actions[bot]"
53
git config user.email "github-actions[bot]@users.noreply.github.com"
54
+
55
+ AUTHED_URL="${GITLAB_REPO_URL/https:\/\//https:\/\/oauth2:${GITLAB_TOKEN}@}"
56
- echo "Adding GitLab remote: $GITLAB_REPO_URL"
- git remote add gitlab "$GITLAB_REPO_URL"
57
+ echo "Adding GitLab remote"
58
+ git remote add gitlab "$AUTHED_URL"
59
60
echo "Pushing branch to GitLab as $PR_BRANCH"
61
git push gitlab HEAD:"$PR_BRANCH" --force
0 commit comments