I started using GitHub Actions and I was able to setup a CI pipeline for Elixir, the action builds and tests without any issues. I also wanted to deploy the application using the heroku actions so I went ahead and added the one that is available in GitHub but after doing that I'm getting the following error:
Invalid Workflow File Every step must define a uses or run key
This is how my workflow looked before adding the heroku action:
name: Elixir CI
on: push
jobs:
build:
runs-on: ubuntu-latest
container:
image: elixir:1.9.1-slim
steps:
- uses: actions/checkout@v1
- name: Install Dependencies
run: |
mix local.rebar --force
mix local.hex --force
mix deps.get
test:
runs-on: ubuntu-latest
services:
db:
image: postgres:11
ports: ['5432:5432']
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/[email protected]
- uses: actions/[email protected]
with:
otp-version: 22.x
elixir-version: 1.9.x
- run: mix deps.get
- run: mix test
And this is how I added the heroku action
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- name: GitHub Action for Heroku
- run: |
heroku login
env:
CI: true
Here is the error for more details.
name
are fine (?!) but only the firstuses
can take a dash. – Aryanize