Skip to content

Commit 017b206

Browse files
committed
fix: Streamline SSH known hosts setup in pull request workflow
- Added a pre-setup step for SSH known hosts using a post-check mechanism. - Updated `check.sh` execution to occur in a dedicated shell step. - Optimized logic for Docker installation on macOS.
1 parent 9756bf1 commit 017b206

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

.github/workflows/pull_request.yml

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,24 @@ jobs:
1414
runs-on: ${{ matrix.os }}
1515
steps:
1616
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
17+
- name: Setup post check known hosts
18+
uses: pyTooling/Actions/with-post-step@9ceefdbf5dceae8c441fc393ed82344c7ca8bbdb # v3.1.1
19+
with:
20+
main: |
21+
# Do nothing
22+
exit 0
23+
post: |
24+
./post_check.sh
1725
- name: Setup SSH key
1826
uses: ./
1927
with:
2028
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
2129
ssh-known-hosts: ${{ secrets.SSH_KNOWN_HOSTS }}
2230
log-public-key: false
23-
- name: Check known hosts
24-
uses: pyTooling/Actions/with-post-step@9ceefdbf5dceae8c441fc393ed82344c7ca8bbdb # v3.1.1
25-
with:
26-
main: |
27-
./check.sh
28-
post: |
29-
./post_check.sh
31+
- name: Setup post check known hosts
32+
shell: bash
33+
run: |
34+
./check.sh
3035
- name: Install docker (Missing on MacOS)
3136
if: runner.os == 'macos'
3237
shell: bash

0 commit comments

Comments
 (0)