Github操作未上传工件

问题描述 投票:2回答:1

我在从工作流程中将工件上传到github时遇到问题。

这是我的Yaml文件:


on:
  push:
      branches:
      - master

jobs:
    build:
      name: build and test
      runs-on: ubuntu-latest

      steps:
        - uses: actions/checkout@v1
        - name: Install robotframework and dependencies
          run: |
            pip install selenium
            pip install robotframework
            pip install robotframework-seleniumlibrary
            pip install robotframework-imaplibrary
            pip install robotframework-httplibrary
            pip install robotframework-requests
        - name: Download and install chromedriver
          run: |
            wget http://chromedriver.storage.googleapis.com/77.0.3865.10/chromedriver_linux64.zip
            sudo unzip chromedriver_linux64.zip -d /usr/local/bin
            export CHROME_BIN=chromium-browser
        - name: Run robot tests
          run: |
            cd robot/tests
            python -m robot -i ready bookingform.robot
        - name: publish test results
          uses: actions/upload-artifact@v1
          with:
            name: report
            path: report.html
        - name: clean up stuff
          run: |
            history
            pwd

一切正常,直到“发布测试结果”为止,此时没有任何内容写入日志,也没有任何工件上传。如果我查看工作流程日志,则该步骤旁边会显示一个灰色图标(不是通常的检查或红色的x),所以我真的对可能发生的事情感到困惑。我在“清理工作”步骤中添加了任意内容,只是为了测试会发生什么,而该步骤也不会运行。

我曾尝试弄乱路径,以为它可能与路径无效或其他原因有关,但这并没有帮助。无论我在该文件底部附近添加什么,都会发生相同的行为。

我尝试运行另一个工作流程文件,该文件上传了工件并且运行良好,日志显示调用了上载操作并且工件已保存,但是当使用yaml文件时,我看不到任何类似的信息。] >

我在从工作流程中将工件上传到github时遇到问题。这是我的yaml文件:上:推:分支:-主作业:构建:名称:构建和测试...

workflow artifacts github-actions
1个回答
0
投票

每个作业步骤将工作路径重置为GITHUB_WORKSPACE,它将在actions/checkout运行后成为存储库的根。

© www.soinside.com 2019 - 2024. All rights reserved.