鱼C论坛

 找回密码
 立即注册
查看: 734|回复: 1

yml怎么从github的master下,上传文件big.zip 到公网linux server?

[复制链接]
发表于 2023-2-25 13:10:29 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能^_^

您需要 登录 才可以下载或查看,没有账号?立即注册

x
本帖最后由 blackantt 于 2023-2-26 13:27 编辑

参考
https://github.com/marketplace/actions/copy-via-ssh
Copy a single file to a remote server

- name: Copy single file to remote
        uses: garygrossgarten/github-action-scp@release
        with:
          local: test/oof.txt
          remote: scp/single/oof.txt
          host: ${{ secrets.HOST }}
          username: ${{ secrets.SSH_USER }}
          password: ${{ secrets.PASSWORD }}


参考
https://github.com/nicklasfrahm/scp-action
Uploading local files to remote target
name: upload

on:
  - push

jobs:
  upload:
    name: Upload
    runs-on: ubuntu-latest
    steps:
      - name: Check out repository
        uses: actions/checkout@master

      - name: Upload file via SSH
        uses: nicklasfrahm/scp-action@main
        with:
          direction: upload
          host: ${{ secrets.SSH_TARGET_HOST }}
         
          username: ${{ secrets.SSH_USER }}
          key: ${{ secrets.SSH_PRIVATE_KEY }}
         
          source: |
            path/to/source/a.txt
            path/to/source/b.txt
          target: path/to/target

问题:
1.从main/master下上传,这个main或者master在yml的哪里体现?
2.运行yml时,下面这个选项是干嘛用的?

w1.png

3.怎么知道,能否直接把密码写入yml, 还是必须用${}来调用?
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复

使用道具 举报

 楼主| 发表于 2023-2-26 13:26:43 | 显示全部楼层
with:
  ref: master
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Archiver|鱼C工作室 ( 粤ICP备18085999号-1 | 粤公网安备 44051102000585号)

GMT+8, 2024-5-1 18:37

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表