【问题标题】:Using github actions to create a .zip file in main branch使用 github 操作在主分支中创建 .zip 文件
【发布时间】:2022-11-11 18:50:16
【问题描述】:

目前我有这个将文件夹压缩为 zip 文件的操作:

name: GitHub Actions Demo
on: [push]
jobs:
  To-Zip:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout 
        uses: actions/checkout@v3
      
      - name: Create ankiaddon
        run: zip -r -q folder.zip folder

但我想将这个新的folder.zip 提交到主分支,具体步骤是什么?

【问题讨论】:

标签: git github continuous-integration github-actions


【解决方案1】:

添加以下步骤:

  - name: Commit and push
    uses: EndBug/add-and-commit@v7
    with:
      add: '["folder.zip"]'
      message: 'My commit message'
      push: true

【讨论】:

    猜你喜欢
    • 2020-11-13
    • 2022-08-13
    • 2021-05-23
    • 2020-03-06
    • 2021-11-06
    • 2023-02-02
    • 2022-10-26
    • 1970-01-01
    • 2022-08-15
    相关资源
    最近更新 更多