Home > Enterprise >  Invalid workflow file for GitHub actions
Invalid workflow file for GitHub actions

Time:04-06

So I am just trying to learn how to use github workflow actions and made this simple starter test:

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?

CodePudding user response:

You're indenting the steps, but it should be on the same level as runs-on:

name: Basic test push

on: 
  push:
    branches:
      - 'autoupdate'

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