Skip to content

Commit

Permalink
Merge pull request #39 from buildkite/update-workflow-syntax
Browse files Browse the repository at this point in the history
Update workflow syntax
  • Loading branch information
lizrabuya authored Mar 21, 2023
2 parents cc94a34 + 3bb4ddf commit a5d3e21
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 35 deletions.
28 changes: 12 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,18 @@ Create a [Buildkite API Access Token](https://buildkite.com/docs/apis/rest-api#a

For example, the following workflow creates a new Buildkite build on every commit:

```workflow
workflow "Trigger a Buildkite Build" {
on = "push"
resolves = ["Build"]
}
action "Build" {
uses = "buildkite/trigger-pipeline-action@v1.3.0"
secrets = ["BUILDKITE_API_ACCESS_TOKEN"]
env = {
PIPELINE = "my-org/my-deploy-pipeline"
COMMIT = "HEAD"
BRANCH = "master"
MESSAGE = ":github: Triggered from a GitHub Action"
}
}
```
on: [push]
steps:
- name: Trigger a Buildkite Build
uses: "buildkite/trigger-pipeline-action@v1.3.0"
env:
BUILDKITE_API_ACCESS_TOKEN: ${{ secrets.TRIGGER_BK_BUILD_TOKEN }}
PIPELINE: "my-org/my-deploy-pipeline"
BRANCH: "master"
COMMIT: "HEAD"
MESSAGE: ":github: Triggered from a GitHub Action"
```

## Configuration Options
Expand Down
19 changes: 0 additions & 19 deletions action.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,6 @@
name: 'Trigger Buildkite Pipeline'
author: 'Buildkite'
description: 'A GitHub Action for triggering a build on a Buildkite pipeline.'
inputs:
buildkite_token:
description: 'Buildkite API Access Token'
required: true
pipeline:
description: 'The pipline to create a build on, in the format <org-slug>/<pipeline-slug>'
required: true
commit_sha:
description: 'The commit SHA of the build'
required: false
branch_ref:
description: 'The branch of the build'
required: false
commit_message:
description: 'The message for the build'
required: false
build_env_vars:
description: 'Additional environment variables to set on the build, in JSON format'
required: false
runs:
using: 'docker'
image: 'Dockerfile'

0 comments on commit a5d3e21

Please sign in to comment.