简体   繁体   中英

Invalid workflow file Github Actions (CF CLI)

I'm trying to get this github action to work but once committed it gives me this error:

Invalid workflow file: .github/workflows/main.yml#L1 No steps defined in steps and no workflow called in uses for the following jobs: build

Anyone have any idea what this might depend on?

Below is the code I used:

  name: Deploy to Cloud Foundry

on:
  push:
    branches:
    - master

jobs:
  build:
    runs-on: ubuntu-18.04
    # Build your app here

  deploy:
    runs-on: ubuntu-18.04
    needs: build
    
    steps:
    - uses: citizen-of-planet-earth/cf-cli-action@master
      with:
        cf_api: https://api.my-cloud-foundry.com
        cf_username: ${{ secrets.CF_USER }}
        cf_password: ${{ secrets.CF_PASSWORD }}
        cf_org: AwesomeApp
        cf_space: Development
        command: push -f manifest-dev.yml

Thanks in advance to everyone

Following the Workflow Syntax for Github Actions , you'll identify that some fields are mandatory.

At the workflow level, you need to have at least a trigger (configure with the on field) and a list of jobs specified.

Then, in that list of jobs , you have to specify at least one job, where each of those jobs needs at least the runner and the steps (or the uses for reusable workflow) field configured.

Example of the minimum configurations you would use for a job:

on: push

jobs:
  job1:
    runs-on: ubuntu-latest
    steps:
      - name: Print a greeting
        run: echo 'Hello World'

  job2: # reusable workflow scenario
    uses: owner/repo/.github/workflows/reusable-workflow.yml@main

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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