diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index b0fae7d..0351280 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -47,27 +47,10 @@ jobs: ssh-private-key: | ${{secrets.SOURCE_REPO_SSH_KEY}} - - name: Add ssh_known_hosts - run: | - HOST=${{ secrets.SOURCE_REPO_GIT }} - echo "::add-mask::$HOST" - IPS=$(nslookup "$HOST" | awk '/^Address: / { print $2 }') - for IP in $IPS; do - echo "::add-mask::$IP" - done - mkdir -p ~/.ssh - touch ~/.ssh/known_hosts - HOST_KEYS=$(ssh-keyscan -H "$HOST" 2>/dev/null) - echo "$HOST_KEYS" | while IFS= read -r KEY_LINE; do - CONSTANT_PART=$(echo "$KEY_LINE" | awk '{print $2, $3}') - if ! grep -q "$CONSTANT_PART" ~/.ssh/known_hosts; then - echo "$KEY_LINE" >> ~/.ssh/known_hosts - fi - done - - name: Setup git run: | git config --global url."ssh://git@${SOURCE_REPO_GIT}/".insteadOf "https://flant.internal/" + git config --global core.sshCommand "ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" git config --global --add safe.directory '*' - name: Build and package @@ -111,27 +94,10 @@ jobs: ssh-private-key: | ${{secrets.SOURCE_REPO_SSH_KEY}} - - name: Add ssh_known_hosts - run: | - HOST=${{ secrets.SOURCE_REPO_GIT }} - echo "::add-mask::$HOST" - IPS=$(nslookup "$HOST" | awk '/^Address: / { print $2 }') - for IP in $IPS; do - echo "::add-mask::$IP" - done - mkdir -p ~/.ssh - touch ~/.ssh/known_hosts - HOST_KEYS=$(ssh-keyscan -H "$HOST" 2>/dev/null) - echo "$HOST_KEYS" | while IFS= read -r KEY_LINE; do - CONSTANT_PART=$(echo "$KEY_LINE" | awk '{print $2, $3}') - if ! grep -q "$CONSTANT_PART" ~/.ssh/known_hosts; then - echo "$KEY_LINE" >> ~/.ssh/known_hosts - fi - done - - name: Setup git run: | git config --global url."ssh://git@${SOURCE_REPO_GIT}/".insteadOf "https://flant.internal/" + git config --global core.sshCommand "ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" git config --global --add safe.directory '*' - name: Run tests