【发布时间】:2022-01-27 00:52:07
【问题描述】:
我开始使用 GitHub Actions,并且能够为 Elixir 设置 CI 管道,该操作构建和测试没有任何问题。我还想使用 heroku 操作部署应用程序,所以我继续添加了 GitHub 中可用的应用程序,但之后我收到以下错误:
无效的工作流文件 每一步都必须定义一个使用或运行键
这是我的工作流程在添加 heroku 操作之前的样子:
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/checkout@v1.0.0
- uses: actions/setup-elixir@v1.0.0
with:
otp-version: 22.x
elixir-version: 1.9.x
- run: mix deps.get
- run: mix test
这就是我添加 heroku 动作的方式
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/heroku@1.0.0
- name: GitHub Action for Heroku
- run: |
heroku login
env:
CI: true
Here 是更多详细信息的错误。
【问题讨论】:
标签: github elixir github-actions elixir-mix