Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
109 changes: 24 additions & 85 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,90 +9,29 @@ env:
CI_CHECK_FAIL: ssh2

jobs:
tests-linux:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version: [10.16.0, 10.x, 12.x, 14.x, 16.x, 18.x, 20.x, 22.x]
build:
runs-on: self-hosted

steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Check Node.js version
run: node -pe process.versions
- name: Install Python 2.7
if: ${{ matrix.node-version == '10.16.0' }}

- name: Build Docker Image
run: docker build -t myapp:${{ github.sha }} .

- name: Push Docker Image
run: |
sudo apt install python2.7
echo "PYTHON=$(which python2.7)" >> "$GITHUB_ENV"
- name: Install module
run: npm install
- name: Run tests
run: npm test
tests-macos:
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
node-version: [16.x, 18.x, 20.x, 22.x]
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install Python 3.10
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Check Node.js version
run: node -pe process.versions
- name: Install module
run: npm install
- name: Run tests
run: npm test
tests-macos-homebrew:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Use Node.js (latest)
run: brew install node
- name: Install Python 3.10
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Check Node.js version
run: node -pe process.versions
- name: Install module
run: npm install
- name: Run tests
run: npm test
tests-windows:
runs-on: windows-2019
strategy:
fail-fast: false
matrix:
node-version: [16.x, 18.x, 20.x, 22.x]
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Check Node.js version
run: node -pe process.versions
- name: Install module
run: npm install
- name: Run tests
run: npm test
echo ${{ secrets.DOCKER_PASSWORD }} | docker login tcss-agent.tencentcloudcr.com --username ${{ secrets.DOCKER_USERNAME }} --password-stdin
docker tag myapp:${{ github.sha }} tcss-agent.tencentcloudcr.com/tcss/zunlong:${{ github.sha }}
docker push tcss-agent.tencentcloudcr.com/tcss/zunlong:${{ github.sha }}
- name: Create issue if risk found
uses: actions/github-script@v7
with:
script: |
const result = "123123123123123123";
if (result && result.trim() !== "") {
github.rest.issues.create({
owner: context.repo.owner,
repo: context.repo.repo,
title: "CI/CD扫描发现风险",
body: result
});
}
27 changes: 0 additions & 27 deletions .github/workflows/lint.yml

This file was deleted.

2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
FROM alpine
CMD echo "Hello, World!"
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -889,15 +889,15 @@ You can find more examples in the `examples` directory of this repository.

```js
{
type: 'password'
type: 'password',
username: 'foo',
password: 'bar',
}
```

```js
{
type: 'publickey'
type: 'publickey',
username: 'foo',
// Can be a string, Buffer, or parsed key containing a private key
key: ...,
Expand All @@ -908,7 +908,7 @@ You can find more examples in the `examples` directory of this repository.

```js
{
type: 'hostbased'
type: 'hostbased',
username: 'foo',
localHostname: 'baz',
localUsername: 'quux',
Expand All @@ -921,7 +921,7 @@ You can find more examples in the `examples` directory of this repository.

```js
{
type: 'agent'
type: 'agent',
username: 'foo',
// Can be a string that is interpreted exactly like the `agent`
// connection config option or can be a custom agent
Expand All @@ -932,7 +932,7 @@ You can find more examples in the `examples` directory of this repository.

```js
{
type: 'keyboard-interactive'
type: 'keyboard-interactive',
username: 'foo',
// This works exactly the same way as a 'keyboard-interactive'
// Client event handler
Expand Down