From 910765a45eebe4af87a708c6c52f219576b93286 Mon Sep 17 00:00:00 2001 From: Bastian Doetsch Date: Wed, 19 Jun 2024 14:15:26 +0200 Subject: [PATCH] fix: try to push using ssh --- .github/create-cli-pr.sh | 6 +++--- .github/workflows/create-cli-pr.yaml | 7 ++++++- .github/workflows/release.yaml | 4 ++++ 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/.github/create-cli-pr.sh b/.github/create-cli-pr.sh index c13d00e58..fe8a4361a 100755 --- a/.github/create-cli-pr.sh +++ b/.github/create-cli-pr.sh @@ -18,15 +18,15 @@ set -ex CLI_DIR=$(mktemp -d) -gh repo clone snyk/cli $CLI_DIR +gh repo clone git@github.com:snyk/cli.git $CLI_DIR -- --depth=1 pushd $CLI_DIR UPGRADE=$(go run scripts/upgrade-snyk-go-dependencies.go --name=snyk-ls) LS_VERSION=$(echo $UPGRADE | sed 's/.*Sha: \(.*\) URL.*/\1/') BRANCH=feat/automatic-upgrade-of-ls-to-$LS_VERSION git checkout -b $BRANCH - git config --global user.email "team-ide-user@snyk.io" - git config --global user.name "Snyk Team IDE User" + git config --global user.email "team-ide@snyk.io" + git config --global user.name "Snyk Team IDE" git commit -am "feat: automatic integration of language server $LS_VERSION" git push --set-upstream origin $BRANCH diff --git a/.github/workflows/create-cli-pr.yaml b/.github/workflows/create-cli-pr.yaml index dcb3ebb52..3e7bc9700 100644 --- a/.github/workflows/create-cli-pr.yaml +++ b/.github/workflows/create-cli-pr.yaml @@ -21,9 +21,14 @@ jobs: with: go-version: ${{ env.GO_VERSION }} + - uses: webfactory/ssh-agent@v0.9.0 + with: + ssh-private-key: ${{ secrets.TEAM_IDE_USER_SSH }} + - name: Create PR in CLI to integrate LS env: GH_TOKEN: ${{ secrets.HAMMERHEAD_GITHUB_PAT_SNYKLS }} - GITHUB_TOKEN: ${{ secrets.HAMMERHEAD_GITHUB_PAT_SNYKLS }} + GITHUB_TOKEN: ${{ secrets.HAMMERHEAD_GITHUB_PAT_SNYKLS }}TEAM_IDE_USER_SSH + run: | .github/create-cli-pr.sh diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 9fb174653..6f630b520 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -153,6 +153,10 @@ jobs: run: | .github/upload-to-s3.sh + - uses: webfactory/ssh-agent@v0.9.0 + with: + ssh-private-key: ${{ secrets.TEAM_IDE_USER_SSH }} + - name: Create PR in CLI to integrate LS env: GH_TOKEN: ${{ secrets.HAMMERHEAD_GITHUB_PAT_SNYKLS }}