From 09dd8aaab945091215db5813561c3823d1cf44ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=B6ller?= Date: Wed, 14 Aug 2019 12:01:15 +0200 Subject: [PATCH] Enhancement: Update README.md to reflect migration to yml format --- README.md | 46 +++++++++++++++++++++++++++------------------- 1 file changed, 27 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index 330efe3..60f9835 100644 --- a/README.md +++ b/README.md @@ -10,30 +10,38 @@ That is, when you enable this action, the action will fail when a `composer.json ## Usage -Define a workflow in `.github/main.workflow` like this: +Define a workflow in `.github/workflows/ci.yml` (or add a job if you alread have defined workflows) like this: -``` -workflow "Main" { - on = "push" - resolves = ["composer-normalize"] -} - -action "composer-normalize" { - uses = "docker://localheinz/composer-normalize-action" -} +```yaml +name: CI + +on: push + +jobs: + composer-normalize: + name: composer-normalize + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + - name: Run localheinz/composer-normalize + uses: docker://localheinz/composer-normalize-action ``` You can also use a specific tag, for example, `x.y.z` (otherwise, `latest` will be used). -``` -workflow "Main" { - on = "push" - resolves = ["composer-normalize"] -} - -action "composer-normalize" { - uses = "docker://localheinz/composer-normalize-action:x.y.z" -} +```yaml +name: CI + +on: push + +jobs: + composer-normalize: + name: composer-normalize + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + - name: Run localheinz/composer-normalize + uses: docker://localheinz/composer-normalize-action:x.y.z ``` :bulb: Also see [GitHub Actions: Using a Dockerfile image in an action](https://developer.github.com/actions/managing-workflows/workflow-configuration-options/#using-a-dockerfile-image-in-an-action)