Skip to content

Commit 7c66aeb

Browse files
committed
fix: set up SSH deploy key inline without third-party action
1 parent c1a272d commit 7c66aeb

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

.github/workflows/release.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,10 @@ jobs:
2828
runs-on: ubuntu-latest
2929
needs: goreleaser
3030
steps:
31-
- name: Set up SSH deploy key
32-
uses: webfactory/ssh-agent@a6f90b1f127823b31d4d4a8d96047790581d1d7c # v0.9.1
33-
with:
34-
ssh-private-key: ${{ secrets.HOMEBREW_TAP_DEPLOY_KEY }}
35-
3631
- name: Update Homebrew formula
3732
env:
3833
TAG: ${{ github.ref_name }}
34+
HOMEBREW_TAP_DEPLOY_KEY: ${{ secrets.HOMEBREW_TAP_DEPLOY_KEY }}
3935
run: |
4036
VERSION="${TAG#v}"
4137
BASE_URL="https://github.com/serpapi/serpapi-cli/releases/download/${TAG}"
@@ -93,6 +89,13 @@ jobs:
9389
end
9490
FORMULA
9591
92+
# Set up SSH with deploy key
93+
mkdir -p ~/.ssh
94+
echo "$HOMEBREW_TAP_DEPLOY_KEY" > ~/.ssh/deploy_key
95+
chmod 600 ~/.ssh/deploy_key
96+
ssh-keyscan github.com >> ~/.ssh/known_hosts
97+
export GIT_SSH_COMMAND="ssh -i ~/.ssh/deploy_key -o IdentitiesOnly=yes"
98+
9699
# Clone, update formula, push
97100
git clone git@github.com:serpapi/homebrew-tap.git
98101
cp /tmp/serpapi-cli.rb homebrew-tap/Formula/serpapi-cli.rb

0 commit comments

Comments
 (0)