|
4 | 4 | DEBUG: napi:* |
5 | 5 | APP_NAME: python-node |
6 | 6 | MACOSX_DEPLOYMENT_TARGET: '10.13' |
7 | | - CARGO_NET_GIT_FETCH_WITH_CLI: 'true' |
8 | 7 |
|
9 | 8 | permissions: |
10 | 9 | contents: write |
|
96 | 95 | with: |
97 | 96 | name: wasm-bindings |
98 | 97 | path: . |
99 | | - - uses: webfactory/ssh-agent@v0.9.0 |
100 | | - with: |
101 | | - ssh-private-key: | |
102 | | - ${{ secrets.HTTP_HANDLER_ACCESS_TOKEN }} |
103 | | - ${{ secrets.HTTP_REWRITER_ACCESS_TOKEN }} |
104 | 98 | - uses: pnpm/action-setup@v4 |
105 | 99 | with: |
106 | 100 | version: latest |
@@ -151,43 +145,6 @@ jobs: |
151 | 145 | corepack disable |
152 | 146 | npm i -gf pnpm |
153 | 147 |
|
154 | | - # Set up SSH keys (to checkout private repos with cargo) |
155 | | - mkdir -p ~/.ssh |
156 | | - chmod 700 ~/.ssh |
157 | | -
|
158 | | - # Save SSH keys to files |
159 | | - echo "${{ secrets.HTTP_HANDLER_ACCESS_TOKEN }}" | tr -d '\r' > ~/.ssh/http_handler_key |
160 | | - echo "${{ secrets.HTTP_REWRITER_ACCESS_TOKEN }}" | tr -d '\r' > ~/.ssh/http_rewriter_key |
161 | | - chmod 600 ~/.ssh/http_handler_key |
162 | | - chmod 600 ~/.ssh/http_rewriter_key |
163 | | -
|
164 | | - # Add GitHub to known hosts (for all aliases) |
165 | | - ssh-keyscan -H github.com >> ~/.ssh/known_hosts |
166 | | -
|
167 | | - # Create SSH config with host aliases |
168 | | - cat > ~/.ssh/config <<'EOF' |
169 | | - Host github.com-http-handler |
170 | | - HostName github.com |
171 | | - User git |
172 | | - IdentityFile ~/.ssh/http_handler_key |
173 | | - IdentitiesOnly yes |
174 | | -
|
175 | | - Host github.com-http-rewriter |
176 | | - HostName github.com |
177 | | - User git |
178 | | - IdentityFile ~/.ssh/http_rewriter_key |
179 | | - IdentitiesOnly yes |
180 | | - EOF |
181 | | - chmod 600 ~/.ssh/config |
182 | | -
|
183 | | - # Configure git to rewrite URLs to use the correct host alias |
184 | | - git config --global url."ssh://git@github.com-http-handler/platformatic/http-handler".insteadOf "ssh://git@github.com/platformatic/http-handler" |
185 | | - git config --global url."ssh://git@github.com-http-rewriter/platformatic/http-rewriter".insteadOf "ssh://git@github.com/platformatic/http-rewriter" |
186 | | -
|
187 | | - # Also handle variations without .git suffix |
188 | | - git config --global url."ssh://git@github.com-http-handler/platformatic/http-handler.git".insteadOf "ssh://git@github.com/platformatic/http-handler.git" |
189 | | - git config --global url."ssh://git@github.com-http-rewriter/platformatic/http-rewriter.git".insteadOf "ssh://git@github.com/platformatic/http-rewriter.git" |
190 | | -
|
191 | 148 | ${{ matrix.settings.build }} |
192 | 149 | - name: Build |
193 | 150 | run: ${{ matrix.settings.build }} |
@@ -234,11 +191,6 @@ jobs: |
234 | 191 | runs-on: ${{ matrix.settings.host }} |
235 | 192 | steps: |
236 | 193 | - uses: actions/checkout@v4 |
237 | | - - uses: webfactory/ssh-agent@v0.9.0 |
238 | | - with: |
239 | | - ssh-private-key: | |
240 | | - ${{ secrets.HTTP_HANDLER_ACCESS_TOKEN }} |
241 | | - ${{ secrets.HTTP_REWRITER_ACCESS_TOKEN }} |
242 | 194 | - uses: pnpm/action-setup@v4 |
243 | 195 | with: |
244 | 196 | version: latest |
@@ -364,43 +316,6 @@ jobs: |
364 | 316 | curl https://sh.rustup.rs -sSf | bash -s -- -y -t ${{ matrix.settings.target }} |
365 | 317 | . "$HOME/.cargo/env" |
366 | 318 |
|
367 | | - # Set up SSH keys (to checkout private repos with cargo) |
368 | | - mkdir -p ~/.ssh |
369 | | - chmod 700 ~/.ssh |
370 | | -
|
371 | | - # Save SSH keys to files |
372 | | - echo "${{ secrets.HTTP_HANDLER_ACCESS_TOKEN }}" | tr -d '\r' > ~/.ssh/http_handler_key |
373 | | - echo "${{ secrets.HTTP_REWRITER_ACCESS_TOKEN }}" | tr -d '\r' > ~/.ssh/http_rewriter_key |
374 | | - chmod 600 ~/.ssh/http_handler_key |
375 | | - chmod 600 ~/.ssh/http_rewriter_key |
376 | | -
|
377 | | - # Add GitHub to known hosts (for all aliases) |
378 | | - ssh-keyscan -H github.com >> ~/.ssh/known_hosts |
379 | | -
|
380 | | - # Create SSH config with host aliases |
381 | | - cat > ~/.ssh/config <<'EOF' |
382 | | - Host github.com-http-handler |
383 | | - HostName github.com |
384 | | - User git |
385 | | - IdentityFile ~/.ssh/http_handler_key |
386 | | - IdentitiesOnly yes |
387 | | -
|
388 | | - Host github.com-http-rewriter |
389 | | - HostName github.com |
390 | | - User git |
391 | | - IdentityFile ~/.ssh/http_rewriter_key |
392 | | - IdentitiesOnly yes |
393 | | - EOF |
394 | | - chmod 600 ~/.ssh/config |
395 | | -
|
396 | | - # Configure git to rewrite URLs to use the correct host alias |
397 | | - git config --global url."ssh://git@github.com-http-handler/platformatic/http-handler".insteadOf "ssh://git@github.com/platformatic/http-handler" |
398 | | - git config --global url."ssh://git@github.com-http-rewriter/platformatic/http-rewriter".insteadOf "ssh://git@github.com/platformatic/http-rewriter" |
399 | | -
|
400 | | - # Also handle variations without .git suffix |
401 | | - git config --global url."ssh://git@github.com-http-handler/platformatic/http-handler.git".insteadOf "ssh://git@github.com/platformatic/http-handler.git" |
402 | | - git config --global url."ssh://git@github.com-http-rewriter/platformatic/http-rewriter.git".insteadOf "ssh://git@github.com/platformatic/http-rewriter.git" |
403 | | -
|
404 | 319 | cargo test --target ${{ matrix.settings.target }} |
405 | 320 | - name: Test bindings |
406 | 321 | uses: addnab/docker-run-action@v3 |
@@ -431,11 +346,6 @@ jobs: |
431 | 346 | - test-linux-binding |
432 | 347 | steps: |
433 | 348 | - uses: actions/checkout@v4 |
434 | | - - uses: webfactory/ssh-agent@v0.9.0 |
435 | | - with: |
436 | | - ssh-private-key: | |
437 | | - ${{ secrets.HTTP_HANDLER_ACCESS_TOKEN }} |
438 | | - ${{ secrets.HTTP_REWRITER_ACCESS_TOKEN }} |
439 | 349 | - uses: pnpm/action-setup@v4 |
440 | 350 | with: |
441 | 351 | version: latest |
@@ -509,17 +419,3 @@ jobs: |
509 | 419 | else |
510 | 420 | echo "Not a release, skipping publish" |
511 | 421 | fi |
512 | | - - name: Collect npm logs |
513 | | - if: always() |
514 | | - run: | |
515 | | - mkdir -p npm-logs |
516 | | - if [ -d "$HOME/.npm/_logs" ]; then |
517 | | - cp -a "$HOME/.npm/_logs/." npm-logs/ |
518 | | - fi |
519 | | - - name: Upload npm logs |
520 | | - if: always() |
521 | | - uses: actions/upload-artifact@v4 |
522 | | - with: |
523 | | - name: npm-logs |
524 | | - path: npm-logs |
525 | | - if-no-files-found: ignore |
0 commit comments