【发布时间】:2021-06-12 23:20:00
【问题描述】:
我在appleboy/ssh-action 上,我有一个非常简单的步骤
steps:
- name: execute remote commands
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.KEY }}
port: ${{ secrets.PORT }}
script: |
echo "Go to the project space"
cd $HOME/actions_workspace/actions-sample
echo "Pulling the repo from the remote server"
git pull origin main
echo "Building the new container"
docker-compose build
它工作正常,但这是输出:
======CMD======
echo "Go to the project space"
cd $HOME/actions_workspace/actions-sample
echo "Pulling the repo from the remote server"
git pull origin main
echo "Building the new container"
docker-compose build
======END======
out: Go to the project space
out: Pulling the repo from the remote server
err: From github.com:floatingpurr/my-test-repo
err: * branch main -> FETCH_HEAD
err: 3961b2c..26e6abe main -> origin/main
out: Updating 3961b2c..26e6abe
out: Fast-forward
out: README.md | 2 +-
out: docker-compose.yml | 12 ++++++------
out: 2 files changed, 7 insertions(+), 7 deletions(-)
out: Building the new container
err: my-test-actions uses an image, skipping
==============================================
✅ Successfully executed commands to all host.
==============================================
我只是想知道为什么我在操作输出中看到 err: 前缀,而不仅仅是 out:(正如我所料),因为一切都很好。
【问题讨论】:
-
我怀疑这意味着
git将这些消息打印到stderr而不是stdout。 -
哦,真的吗?看起来
docker-compose也是如此……它“正常”吗?
标签: bash ssh github-actions