简体   繁体   English

GitHub 操作的无效工作流文件

[英]Invalid workflow file for GitHub actions

So I am just trying to learn how to use github workflow actions and made this simple starter test:所以我只是想学习如何使用 github 工作流程操作并进行这个简单的入门测试:

name: Basic test push
on: 
  push:
    branches:
      - 'autoupdate'

jobs:
  build:
    runs-on: ubuntu-latest
        steps:
         -  run: echo Test One Worked!

However, I get an error:但是,我收到一个错误:

Invalid workflow file
You have an error in your yaml syntax on line 10'

Anyone know why?有人知道为什么吗?

You're indenting the steps , but it should be on the same level as runs-on :您正在缩进steps ,但它应该与runs-on时处于同一级别:

name: Basic test push

on: 
  push:
    branches:
      - 'autoupdate'

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      -  run: echo Test One Worked!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM